Jump to content

Dialog buttons


CephasOz
 Share

Recommended Posts

Example of usage for the 3 button UDF.

CODE
Const $csTtl = "Button Demonstration"

Local $iBtn, $sMsg, $sBtn1, $sBtn2, $sBtn3

$sMsg = "Do you want to Save or Restore?"

$sBtn1 = "&Save"

$sBtn2 = "&Restore"

$sBtn3 = "&Cancel"

$iBtn = Button3( $csTtl, $sMsg, $sBtn1, $sBtn2, $sBtn3, 3 )

Select

Case ( $iBtn == 0 ) ; User closed dialog.

Exit

Case ( $iBtn == 1 ) ; User selected "Save" button.

MsgBox( 64, $csTtl, "You pressed button " & $iBtn )

Case ( $iBtn == 2 ) ; User selected "Restore" button.

MsgBox( 64, $csTtl, "You pressed button " & $iBtn )

Case ( $iBtn == 3 ) ; User selected "Cancel" button.

Exit

EndSelect

buttons.au3

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...