spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links
* AGS Manual
  * Scripting
    * GUI control functions and properties

SetPosition (GUI controls)

(Formerly known as SetGUIObjectPosition, which is now obsolete)

GUIControl.SetPosition(int x, int y)
Moves the top-left corner of the GUI control to be at (X,Y). These co-ordinates are relative to the GUI which contains the control.

This allows you to dynamically move GUI controls around on the screen while the game is running, and this may well be useful in conjunction with GUI.SetSize if you want to create dynamically resizable GUIs.

Applies To

Inherited by the Button, InvWindow, Label, ListBox, Slider and TextBox.

Example:

btnConfirm.SetPosition(40, 10);
will move the btnConfirm button to be positioned at (40,10) within the GUI.

See Also: GUIControl.Enabled, GUI.SetPosition, GUIControl.SetSize, GUIControl.X, GUIControl.Y


User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.