Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Box Popup Menu (Read 3471 times)
idgcorp
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Dec 2nd, 2005
Box Popup Menu
Dec 2nd, 2005 at 11:35am
Print Post  
Hello, Ive tried many different iterations of the ClientPtToDocPt, DocPtToClientPt and ScreenPtToDocPt trying to get the proper coordinates to create a popup menu when a box is clicked on but I am having no success. Can anyone shed some light on what it is I should be doing to achieve this, thanks.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Box Popup Menu
Reply #1 - Dec 2nd, 2005 at 11:54am
Print Post  
Hello,

I believe the coordinates passed to the BoxClicked events are relative to the box top-left corner, so add X and Y to respectively box.Left and box.Top to get the document coordinates. VB context menus just show up where the mouse is so a VB event handler would look like this:

Private Sub fc_BoxClicked(ByVal box As FLOWCHARTLibCtl.IBoxItem, ByVal button As FLOWCHARTLibCtl.EMouseButton, ByVal x As Long, ByVal y As Long)
    If button <> mbRight Then
       Exit Sub
    End If
   
    Me.PopupMenu mnuPopup
End Sub

In other languages you might have to convert to client or screen coordinates, depending on how context menus are displayed there.

Stoyan
  
Back to top
 
IP Logged
 
idgcorp
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Dec 2nd, 2005
Re: Box Popup Menu
Reply #2 - Dec 2nd, 2005 at 12:07pm
Print Post  
Thanks, that does work for the VB popupmenu which is what Im probably going to have to use. I was using a 3rd party control for my menus and it requests the coordinates. I guess the VB menu will have to do Sad Thanks for the quick response.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Box Popup Menu
Reply #3 - Dec 2nd, 2005 at 12:14pm
Print Post  
You can use the third party control too - what coordinates does it need to display the menu - client or screen ones ?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint