Qousio Posted May 3, 2009 Share Posted May 3, 2009 (edited) Hello. Is it possible to redefine the size and amount of gui items that were previously created? For example I create some GUI elements this way: For $I = 1 To $Elements_amount;Элементы.... создаются :) $AElement[$I][0] = GUICtrlCreateLabel(" (o_o)" & @CR & "__v__" & @CR & " |" & @CR & " /\" & @CR & " / \", $Starting_position_X, $Starting_position_Y, $Element_size, $Element_size);Помещаем их куда надо Next My loop is: While $msg <> $GUI_Start $msg = GUIGetMsg() Select Case $msg = $GUI_Start Start() EndSelect WEnd Where start() is a function with infinite loop. I would like to change $Element_size of $Aelement[][], when I do this in the loop nothing happens. Is there something like GuiCtrlSetPos/Colour etc. but for size and amount of gui items? Also: Is it possible to make Labels transparant, I mean the background behind the label text should be transparant. I tried $WS_EX_TRANSPARENT but that didnt help Edited May 3, 2009 by Qousio Link to comment Share on other sites More sharing options...
Valuater Posted May 3, 2009 Share Posted May 3, 2009 (edited) I would strongly suggest you use On-Event-Mode at top use... Opt("GUIOnEventMode", 1) ;0=disabled, 1=OnEvent mode enabled in the creation loop use For $I = 1 To $Elements_amount;Элементы.... создаются $AElement[$I][0] = GUICtrlCreateLabel(" (o_o)" & @CR & "__v__" & @CR & " |" & @CR & " /\" & @CR & " / \", $Starting_position_X, $Starting_position_Y, $Element_size, $Element_size);Помещаем их куда надо GuiCtrlSetOnEvent( -1, "My_Function") Next The While loop... While 1 Sleep(100) Wend Func My_Function() $Key = @GUI_CtrlId ""Last click GUI Control identifier. Only valid in an event Function. See the GUICtrlSetOnEvent function."" ; do your stufff endfunc 8) EDIT: use a seperate function for your button Edited May 3, 2009 by Valuater Link to comment Share on other sites More sharing options...
JackDinn Posted May 3, 2009 Share Posted May 3, 2009 (edited) Hello. Is it possible to redefine the size and amount of gui items that were previously created? For example I create some GUI elements this way I would like to change $Element_size of $Aelement[][], when I do this in the loop nothing happens. Is there something like GuiCtrlSetPos/Colour etc. but for size and amount of gui items?: GUICtrlSetPos is to set the size and pos of a ctrl, GUICtrlSetState($Aelement[][], $GUI_HIDE) or GUICtrlDelete($Aelement[][]) will hide/Delete ctrl's you dont want read through help file "GUI Control update" Edited May 3, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
Qousio Posted May 4, 2009 Author Share Posted May 4, 2009 Thanks allot! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now