Sign in to follow this  
Followers 0
XuxinhaKill

Simple GUI questions

8 posts in this topic

So I'm trying to create my first GUI and I have some questions...

I have a lot of checkbox in my GUI and a button to "Start"... when this button is pressed I need to verify each checkbox... I don't know exactly how to explain cause my english sucks ¬¬...

The user check the boxes he wants then press "Start"

And I need something like this...

If checkbox1 is checked then Func1()

If checkbox2 is checked then Func2()

...I wonder if I can create a vector of 0's and 1's based on checkbox status, or if there's another easiest way to do something like this...

Another question...

I have this Input attached to an UpDown button... and I need the input value as an integer...

Sorry about my english.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then
_Func1()
EndIf

If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then
_Func2()
EndIf

All clear? :)

I don't understand the second question...

Edited by johnmcloud

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

...I wonder if I can create a vector of 0's and 1's based on checkbox status, or if there's another easiest way to do something like this...

What do you mean, do you want to get the status? if that's what you want then you can use GUICtrlGetState ($ControlID) but please read the help file on this function.

Another question...

I have this Input attached to an UpDown button... and I need the input value as an integer...

Sorry about my english.

To get the value for this sort of thing you use: GUICtrlRead($ControlID)

Edited by Aipion

Share this post


Link to post
Share on other sites

thanks johnmcloud and Aipion...

You both used the GUICtrlRead I'll see how it works and implement it in my GUI...

I'll proly post a reply tomorrow...

Thanks a lot guys

Share this post


Link to post
Share on other sites

Thanks guys... I did all I have to do using GUICtrlRead...

Thanks a lot... everything is working now xD

Share this post


Link to post
Share on other sites

Koda form designer is a very useful tool when building GUI's. I'm extremely impatient when it comes to GUI building so if I can piece it together very fast I will. You can find a download link here on the forums and the zip file is very easy to work with.

Good luck in future coding!

Share this post


Link to post
Share on other sites

In fact I used it to desing my GUI xD... Thanks

Share this post


Link to post
Share on other sites

:) good times.

lol

I enjoy Koda - a very powerful and useful tool for sure.

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