Jump to content

Button + popup


Recommended Posts

Basically what i want to do is to show a popup when i click on a button (sort of context menu just under the button). So I used Guicreate with WSpopup style. That is fine but i'd like to get rid of it if by click anywhere in the form or much better elsewhere ... You know like when you click on the start button, popup shows and if you change yout mind you just clik anywhere but on it

Thanks for your help

goto is evil

Link to comment
Share on other sites

Newest unstable allows... control-specific context menus. Here's a way to allow a context menu on left or right clicks...

$GUI = GuiCreate("ExampleGUI")
$button = GuiCtrlCreateButton("SomeButton", 100, 100, 100, 100)
$buttoncontext = GUICtrlCreateContextMenu($button)
GUICtrlCreateMenuitem("This is a context menu...",$buttoncontext)
GuiSetState()
While 1
   $msg = GuiGetMsg()
   If $msg = -3 Then
      ExitLoop
   ElseIf $msg = $button Then
      $p = MouseGetPos()
      MouseClick("right", $p[0], $p[1])
   EndIf
WEnd
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

@killaz219: thank u for the ispress stuff,I shalll use it for other purpose

@cyberslug: your solution is perfect. BTW 1000's thanks for your work on LBS wrapper. It should be incorporated in autoit since get/receivemsg seems unfortunately to be the only way to use this control porperly.

goto is evil

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...