Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, October 19, 2007 11:05:45 AM(UTC)
rpastrick

Groups: Registered
Posts: 1



I am currently using Leadtools 14.5 ActiveX
components.  I am trying to programmatically change the text color of a
text annotation object I have placed programmatically.  As you can see in
the code snippet below, I have used the SetForeColor method to try to change
the Text color. If I use the right click menu to access the various options
that relate to that color such as Foreground Color and Font, they both properly
report the color as Blue.  However, if I look at the Text option, it shows the color as red.


I would like to know what I need to do to programmatically change the color from Red to something else.

Thank you.

hTextHandle = m_pLeadCtrl->AnnCreate(ANNOBJECT_TEXT,TRUE,TRUE);

m_pLeadCtrl->AnnSetLineStyle(hTextHandle, ANNLINE_NULL, FALSE);
m_pLeadCtrl->AnnSetVisible(hTextHandle,TRUE,0, "");
m_pLeadCtrl->SetAnnRectWidth(hTextHandle, 400);
m_pLeadCtrl->SetAnnRectHeight(hTextHandle, 40);
m_pLeadCtrl->SetAnnRectLeft(hTextHandle, 0);
m_pLeadCtrl->SetAnnRectTop(hTextHandle, 300);
m_pLeadCtrl->AnnSetFontSize(hTextHandle, 40, FALSE);
m_pLeadCtrl->AnnSetText(hTextHandle,"This is a test",FALSE);
m_pLeadCtrl->AnnSetForeColor(hTextHandle,RGB(0,0,255),FALSE);

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, October 22, 2007 9:43:22 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)


I tried
the AnnSetForeColor method with an object of type ANNOBJECT_TEXT, and it
changed the color correctly. I used build 14.5.0.67 of ltocx14N.ocx and ltann14n.dll. Which version are you using?

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.065 seconds.