This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, October 19, 2007 11:05:45 AM(UTC)
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);
#2
Posted
:
Monday, October 22, 2007 9:43:22 AM(UTC)
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.