Jump to content

Recommended Posts

Posted

How do I move a control?

I tried:

GUISetControlEx($label_2, 0, 2)

and

GUISetControlEx($label_2, 0, 2)

But they don't move the control.

Here's the script I was testing.

Opt ("GUICoordMode", 1)
Opt ("GUINotifyMode", 1)

GUICreate("Test", 250, 200, -1, -1)

$Line = ""
For $i = 1 To 25
   $Line = $Line & Chr(186)
Next

$label_1 = GUISetControl("label", "Today", 20, 20, 70)
$label_2 = GUISetControl("label", $Line, 20, 40, 70, 10)
GUISetControlFont($label_2, 8, 400, "Arial")
GUISetControlEx($label_2, 0, 0, "", 0x000000, 0xffffff)

GUIShow()

$GUI_DOCKLEFT = 2
$GUI_DOCKRIGHT = 4

$align = "left"

While 1
   Sleep(100)
   $msg = GUIMsg()
   Select
      Case $msg = -3
         GUIDelete()
         Exit

      Case $msg = $label_1
         If $align = "left" Then
            GUISetControlEx($label_2, 0, $GUI_DOCKLEFT)
            $align = "right"
         Else
            GUISetControlEx($label_2, 0, $GUI_DOCKRIGHT)
            $align = "left"
         EndIf

   EndSelect
WEnd
Posted

As the GUI functions have evolved to the new syntax

you have to use the GUICtrlSetPos and not the GUICtrlSetResizing as you were doing with the old GUISetControlEx :ph34r:

Posted (edited)

Assume I don't use the latest version of the unstable.

What's the correct syntax to move a control?

Edited by SlimShady
Posted

Assume I don't use the latest version of the unstable.

What's the correct syntax to move a control?

<{POST_SNAPBACK}>

GUISetControl($controlid, ... :ph34r:

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
  • Recently Browsing   0 members

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