LEADTOOLS Support
Document
Document SDK Questions
Annotation Toolbar - Add Button Functionallity
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, November 9, 2009 4:02:57 AM(UTC)
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
#2
Posted
:
Monday, November 9, 2009 8:06:52 AM(UTC)
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.
LEADTOOLS Support
Document
Document SDK Questions
Annotation Toolbar - Add Button Functionallity
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.