Sign in to follow this  
Followers 0
rizwan

Regarding GUICTRLCREATELIST

2 posts in this topic

I am trying to display the button I press on a screen on the SAME GUI. However they only show one time on the screeen. I want them to continually show it on screen. for example if I press x 3 times i want to see it on screen 3 times. Below is my code. Please help.

$mylist=GUICtrlCreateList ("", 176,32,121,97, $LBS_DISABLENOSCROLL )

$button_1 = GUICtrlCreateButton ("x", 210, 190, 60)

$button_2 = GUICtrlCreateButton ("y", 210, 230, 60)

$button_3 = GUICtrlCreateButton ("Clear", 210, 270, 60)

GUISetState ()

; Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

Select

Case $msg = $button_1 ; x

GUICtrlSetData($mylist,"x")

Case $msg = $button_2 ; y

GUICtrlSetData($mylist,"y")

case $msg = $button_3

GUICtrlSetData($mylist,"")

Case $msg = $GUI_EVENT_CLOSE

;MsgBox(0, "", "Dialog was closed")

Exit

EndSelect

WEnd

Share this post


Link to post
Share on other sites



I am trying to display the button I press on a screen on the SAME GUI. However they only show one time on the screeen. I want them to continually show it on screen. for example if I press x 3 times i want to see it on screen 3 times. Below is my code. Please help.

$mylist=GUICtrlCreateList ("", 176,32,121,97, $LBS_DISABLENOSCROLL )

$button_1 = GUICtrlCreateButton ("x", 210, 190, 60)

$button_2 = GUICtrlCreateButton ("y", 210, 230, 60)

$button_3 = GUICtrlCreateButton ("Clear", 210, 270, 60)

GUISetState ()

; Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

Select

Case $msg = $button_1 ; x

GUICtrlSetData($mylist,"x")

Case $msg = $button_2 ; y

GUICtrlSetData($mylist,"y")

case $msg = $button_3

GUICtrlSetData($mylist,"")

Case $msg = $GUI_EVENT_CLOSE

;MsgBox(0, "", "Dialog was closed")

Exit

EndSelect

WEnd

in your setdata's you're passing only a literal string, not adding to the original, modify them so that they're like:

GUICtrlSetData($mylist,GUICtrlRead($mylist) & "x")

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

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