Sign in to follow this  
Followers 0
layer

GUICtrlCreateInput Overwriting

4 posts in this topic

:D yello everyone... just had a little question, when I use GUICtrlCreateInput... is there a way so that when there are multiple buttons, and if your press the buttons, numbers go in the input, is there a way to make it so that when pressing two buttons, say 1 and 2, instead of this

Input: 2 (NOTE: first i pressed 1, then i pressed 2, and now 2 overwrites it, is there a way to make it so that it doesnt overwrite?)

Thanks!

if it's to complifusing, just tell me, i will explain in further detail! :idiot:


FootbaG

Share this post


Link to post
Share on other sites

#2 ·  Posted (edited)

@jpm: maybe this is one for you :D

Maybe an addition for the GUICtrlSetData()?

@layer: cause it is not possible normally for a gui-input-control you can make your own 'input-control' like:

#include <GUIConstants.au3>

GUICreate("listbox")

$input = GUICtrlCreateEdit("",10,10,100,20,$ES_AUTOHSCROLL)

$button1 = GUICtrlCreateButton("Button1",10,80,70,20)
$button2 = GUICtrlCreateButton("Button2",10,110,70,20)

GUISetState()

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
            
        Case $msg = $button1
            GUICtrlSetData($input,"1",1)
        Case $msg = $button2
            GUICtrlSetData($input,"2",1)
    EndSelect
WEnd

In the function GUICtrlSetData($input,"2",1) the third parameter has to be something but "" (empty string) !!!

Regards Holger :idiot:

Edited by Holger

Share this post


Link to post
Share on other sites

thanks a million =)


FootbaG

Share this post


Link to post
Share on other sites

thanks a million =)

<{POST_SNAPBACK}>

next update I will add the capability to work on input control as on edit ones :idiot:

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