Sign in to follow this  
Followers 0
CephasOz

Dialog buttons

1 post in this topic

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0