Jump to content

GUI Redefining help needed!


Recommended Posts

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 by Qousio
Link to comment
Share on other sites

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 by Valuater

NEWHeader1.png

Link to comment
Share on other sites

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 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

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...