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 : Monday, November 9, 2009 4:02:57 AM(UTC)

m_tzou  
m_tzou

Groups: Registered
Posts: 8


Hello ,

I am evaluating version 16.5 and i would really need some help on annoation Toolbar.. Excuse me if the questions that follow are stupid but in this particular region i am really a newbie..
What i am tring to implement is to add some custom RubberStampObjects in the Annotation Toolbar.. I am using LeadTools OCX in powerbuilder development..

--Load Annotation Toolbar
ole_image16.object.AnnToolbar.Visible = False
ole_image16.object.AnnToolbar.Create(0, 0, 0)
ole_image16.object.AnnToolbar.Visible = True
ole_image16.object.AnnToolbar.AutoSetTool = true
ole_image16.object.AnnToolbar.ButtonTool[ole_image16.object.AnnToolbar.ButtonCount] = 256 //ANNTOOL_USER_FIRST
ole_image26.object.Load( "F:\prev24.bmp" ,  0, 0, 1)
ole_image16.object.AnnToolbar.ButtonBitmapUp[ole_image16.object.AnnToolbar.ButtonCount] = ole_image26.object.Bitmap
ole_image16.object.AnnToolbar.ButtonBitmapDown[ole_image16.object.AnnToolbar.ButtonCount]  = ole_image26.object.Bitmap
ole_image16.object.AnnToolbar.ButtonToolTipTextID[ole_image16.object.AnnToolbar.ButtonCount] = -1
ole_image16.object.AnnToolbar.ButtonToolTipText[ole_image16.object.AnnToolbar.ButtonCount] = "User defined tool"
ole_image16.object.AnnToolbar.ButtonCount = ole_image16.object.AnnToolbar.ButtonCount + 1
ole_image16.object.AnnToolbar.ButtonTool[ole_image16.object.AnnToolbar.ButtonCount] = 256 //ANNTOOL_USER_FIRST
ole_image26.object.Load( "F:\next.bmp" ,  0, 0, 1)
ole_image16.object.AnnToolbar.ButtonBitmapUp[ole_image16.object.AnnToolbar.ButtonCount] = ole_image26.object.Bitmap
ole_image16.object.AnnToolbar.ButtonBitmapDown[ole_image16.object.AnnToolbar.ButtonCount]  = ole_image26.object.Bitmap
ole_image16.object.AnnToolbar.ButtonToolTipTextID[ole_image16.object.AnnToolbar.ButtonCount] = -1
ole_image16.object.AnnToolbar.ButtonToolTipText[ole_image16.object.AnnToolbar.ButtonCount] = "User defined tool"
ole_image16.object.AnnToolbar.ButtonCount = ole_image16.object.AnnToolbar.ButtonCount + 1


I have managed to insert 2 new buttons but i don't know where to handle when the user clicks on these new buttons..

Thanks in advance for your help
Maria
 

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, November 9, 2009 8:06:52 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

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

Maria,
Do you want to detect when the buttons you created were clicked?
If yes, you can handle the AnnToolChecked event and the value of tool will be passed in the iTool parameter of the event.

Please note that in your case, you are assigning the same value (ANNTOOL_USER_FIRST = 256) to both buttons, which is incorrect. You should give them different values, such as 256 and 257.
 
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.054 seconds.