Sign in to follow this  
Followers 0
totoymola

Change the data set to a control

4 posts in this topic

#1 ·  Posted (edited)

Hi. Summer is coming so its time to learn AutoIt again. :(

#include <GUIConstants.au3>
$Form1 = GUICreate("GCSD Test", 212, 42, 459, 488, -1, BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))
$Button1 = GUICtrlCreateButton("Modify", 128, 8, 75, 25, $BS_DEFPUSHBUTTON)
$Input1 = GUICtrlCreateInput("ORIGINAL", 8, 8, 113, 21, $ES_READONLY)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    $msg = $Button1
    GUICtrlSetData($Input1, "MODIFIED");----- this does not work!!
    Case Else
;;;;;;;
    EndSelect
WEnd
Exit

What I want to do is to change the data set to the input control when I click the button. Is it posible?

Thanks! :)

Edited by totoymola

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi. Summer is coming so its time to learn AutoIt again. :(

#include <GUIConstants.au3>
$Form1 = GUICreate("GCSD Test", 212, 42, 459, 488, -1, BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))
$Button1 = GUICtrlCreateButton("Modify", 128, 8, 75, 25, $BS_DEFPUSHBUTTON)
$Input1 = GUICtrlCreateInput("ORIGINAL", 8, 8, 113, 21, $ES_READONLY)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    $msg = $Button1
    GUICtrlSetData($Input1, "MODIFIED");----- this does not work!!
    Case Else
;;;;;;;
    EndSelect
WEnd
Exit

What I want to do is to change the data set to the input control when I click the button. Is it posible?

Thanks! :)

you're problem is on line 11

$msg = $Button1

should be:

case $msg = $button1

the result would be:

#include <GUIConstants.au3>
$Form1 = GUICreate("GCSD Test", 212, 42, 459, 488, -1, BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))
$Button1 = GUICtrlCreateButton("Modify", 128, 8, 75, 25, $BS_DEFPUSHBUTTON)
$Input1 = GUICtrlCreateInput("ORIGINAL", 8, 8, 113, 21, $ES_READONLY)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        Exit
    Case $msg = $Button1
    GUICtrlSetData($Input1, "MODIFIED");----- this does work now!!
    Case Else
;;;;;;;
    EndSelect
WEnd
Exit
Edited by blademonkey

---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites

Hahaha!! I can't believe I missed that! What a stupid mistake. Thanks a lot mate! :)

Share this post


Link to post
Share on other sites

Hahaha!! I can't believe I missed that! What a stupid mistake. Thanks a lot mate! :)

It's not a stupid mistake if you can fix it.

{= )


---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

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