Jump to content

Changing button properties


Recommended Posts

Maby something like this:

GUICreate("Sample",610,500)
Dim $controls[180]

Dim $x=10, $y=10
For $i=0 To Ubound($controls)-1
    $controls[$i]=GUICtrlCreateButton($i,$x,$y,30,30)
    $x+=40
    If $x>=600 Then
        $x=10
        $y+=40
    EndIf
Next

GUISetSTate()
_RandomizeControlColor($controls)

Do
    $msg=GUIGetMsg()

Until $msg=-3


Func _RandomizeControlColor($array)
    For $i=0 To UBound($array)-1
        GUICtrlSetBkColor($array[$i],Random(0x000000,0xFFFFFF,1))
    Next
EndFunc

:)

Broken link? PM me and I'll send you the file!

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