Sign in to follow this  
Followers 0
malkierian

How to update/change GUI/form at button click

4 posts in this topic

OK, so I've been looking far and wide (tutorials, function/macro references, etc.) and I cannot find the answer to this question.

Posted Image

This is what I have so far (I haven't even gotten into multiple radio buttons yet, but I will need to at some point). I am using Koda for the GUI part for the most part.

What I need is to be able to click the next button and make a new window/update the window to something else based on what radio button is selected. I don't know if it's some new GUI window that needs to be created with a new form or what, but I'm just completely stumped.

Share this post


Link to post
Share on other sites



OK, so I've been looking far and wide (tutorials, function/macro references, etc.) and I cannot find the answer to this question.

This is what I have so far (I haven't even gotten into multiple radio buttons yet, but I will need to at some point). I am using Koda for the GUI part for the most part.

What I need is to be able to click the next button and make a new window/update the window to something else based on what radio button is selected. I don't know if it's some new GUI window that needs to be created with a new form or what, but I'm just completely stumped.

Maybe this example helps.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Mmm, that looks good. Do I just need to have a function for each radio button that changes the content of the next tab when it's pressed?

Share this post


Link to post
Share on other sites

Just do something like this.

#include <GUIConstantsEx.au3>

Opt("guioneventmode", 1)

$gui = GUICreate("", 100, 83)
GUISetOnEvent($GUI_EVENT_CLOSE, "close")
$radio1 = GUICtrlCreateRadio("radio 1", 5, 5, 90, 21)
$radio2 = GUICtrlCreateRadio("radio 2", 5, 31, 90, 21)
GUICtrlCreateButton("button", 5, 57, 90, 21)
GUICtrlSetOnEvent(-1, "changegui")
GUISetState()

While 1
    Sleep(100)
WEnd

Func changegui()
    If GUICtrlRead($radio1) = $GUI_CHECKED Then
;~      change gui's
    Else
;~      change gui's
    EndIf
EndFunc

Func close()
    Exit
EndFunc

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

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