Jump to content

gui combo box deleting...


Faleira
 Share

Recommended Posts

#include <GUIConstants.au3>
$startup = GUICreate("Setup", 400, 300)
GUISetFont(24)
GUICtrlCreateLabel("", 140, 5)
GUISetFont(9)
GUICtrlCreateGroup("", 0, 0, 400, 40)
GUICtrlCreateLabel("1-5", 10, 50)
$1combo = GUICtrlCreateCombo("", 130, 47, 40)
GUICtrlSetData(-1, "1|2|3|4|5", 1)
$1combocheck = GUICtrlCreateButton("OK", 180, 45, 40)
$1submitcheck = GUICtrlCreateButton("Submit!", 180, 260)
GUISetState()


While 1
    $Getmsg = GUIGetMsg()
    If $Getmsg = $1combocheck Then
        For $1x = 1 To GUICtrlRead($1combo)
            GUICtrlCreateInput("field1", 10, 70 + $1x * 30, 150)
            GUICtrlCreateInput("field2", 170, 70 + $1x * 30, 150)
        Next
    EndIf
    
    
    
    If $Getmsg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd

Is there possibly a way so that the input boxes taht appear will change as u keep changing the combo value? Because, since i made the input fields with a for command, i can't figure a way that i could do it so that i could delete them... (like going from 5 back to 1) Also, memory wise, would it be best to just leave it as is with the 'ok' button, or should i just throw a 'read control value' into the while loop, so it auto changes the input boxes as soon as u change the combo?

[quote]If whenever you feel small, useless, offended, depressed, and just generally upset always remember......you were once the fastest and most vicious sperm out of hundreds of millions![/quote]

Link to comment
Share on other sites

Is there possibly a way so that the input boxes taht appear will change as u keep changing the combo value?

GUICtrlRead ( controlID [, advanced] ) is what you want.

Here is an example of what you can do but doesn't apply to your code.

$A = GUICtrlRead ($test1)
$B = GUICtrlRead ($test2)

$C = $A + $B

MsgBox(0, "Bing", $C)

[quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD()

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...