Creation/Dev/Script/Client/GuiFrameSetCtrl: Difference between revisions
No edit summary |
Pooper200000 (talk | contribs) No edit summary |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Scripting Reference]] | |||
Inherits [[Creation/Dev/Script/Client/GuiControl|GuiControl]]. | Inherits [[Creation/Dev/Script/Client/GuiControl|GuiControl]]. | ||
=Description= | |||
[[Image:Guicontrol_frames.png]] | |||
This control is basicly used for what you have ''bevels'' in other GUI systems. You can let the user control how much space each control should get, the user can click on the line between two controls and move the line to the left or right to resize the controls (or up/down depending on the placement). | |||
First specify ''columncount'' and ''rowcount'', then set the row offsets and column offsets with setrowoffset(row,offset) and setcolumnoffset(column,offset). Afterwards add the controls. Once you have added the right number of controls (rowcount * columncount), you can also access the frames[row,column] to have some more control about the behaviour of each frame, e.g. setting the minimum size: | |||
frames[0,0].minextent = {100,100}; | |||
Line 6: | Line 16: | ||
autobalance - boolean | autobalance - boolean | ||
bordercolor - | bordercolor - {red,green,blue} | ||
borderenable - string | borderenable - string | ||
bordermovable - | bordermovable - either "alwaysOn", "alwaysOff" or "dynamic" | ||
borderwidth - integer | borderwidth - integer | ||
Line 20: | Line 30: | ||
fudgefactor - integer | fudgefactor - integer | ||
minextent - | minextent - minimum {width, height} | ||
rowcount - integer | rowcount - integer | ||
=Functions= | =Functions= | ||
Line 42: | Line 51: | ||
setrowoffset(int, int) | setrowoffset(int, int) | ||
=Example= | |||
new GuiFrameSetCtrl("Test_Frames") { | |||
x = 10; | |||
y = 10; | |||
width = 160; | |||
height = 160; | |||
rowcount = 2; | |||
columncount = 2; | |||
setColumnOffset(1,80); | |||
setRowOffset(1,80); | |||
bordercolor = {128,128,255,128}; | |||
new GuiScrollCtrl("Test_Frame1") { | |||
profile = GuiBlueScrollProfile; | |||
hScrollBar = "dynamic"; | |||
vScrollBar = "dynamic"; | |||
} | |||
new GuiScrollCtrl("Test_Frame2") { | |||
profile = GuiBlueScrollProfile; | |||
hScrollBar = "dynamic"; | |||
vScrollBar = "dynamic"; | |||
} | |||
new GuiScrollCtrl("Test_Frame3") { | |||
profile = GuiBlueScrollProfile; | |||
hScrollBar = "dynamic"; | |||
vScrollBar = "dynamic"; | |||
} | |||
new GuiScrollCtrl("Test_Frame4") { | |||
profile = GuiBlueScrollProfile; | |||
hScrollBar = "dynamic"; | |||
vScrollBar = "dynamic"; | |||
} | |||
} |
Latest revision as of 23:52, 15 February 2010
Inherits GuiControl.
Description
This control is basicly used for what you have bevels in other GUI systems. You can let the user control how much space each control should get, the user can click on the line between two controls and move the line to the left or right to resize the controls (or up/down depending on the placement).
First specify columncount and rowcount, then set the row offsets and column offsets with setrowoffset(row,offset) and setcolumnoffset(column,offset). Afterwards add the controls. Once you have added the right number of controls (rowcount * columncount), you can also access the frames[row,column] to have some more control about the behaviour of each frame, e.g. setting the minimum size:
frames[0,0].minextent = {100,100};
Variables
autobalance - boolean
bordercolor - {red,green,blue}
borderenable - string
bordermovable - either "alwaysOn", "alwaysOff" or "dynamic"
borderwidth - integer
columncount - integer
frames[x,y] - array of TFrameDetail
fudgefactor - integer
minextent - minimum {width, height}
rowcount - integer
Functions
getcolumncount() - returns integer
getcolumnoffset(int) - returns integer
getrowcount() - returns integer
getrowoffset(int) - returns integer
setcolumncount(int)
setcolumnoffset(int, int)
setrowcount(int)
setrowoffset(int, int)
Example
new GuiFrameSetCtrl("Test_Frames") { x = 10; y = 10; width = 160; height = 160; rowcount = 2; columncount = 2; setColumnOffset(1,80); setRowOffset(1,80); bordercolor = {128,128,255,128}; new GuiScrollCtrl("Test_Frame1") { profile = GuiBlueScrollProfile; hScrollBar = "dynamic"; vScrollBar = "dynamic"; } new GuiScrollCtrl("Test_Frame2") { profile = GuiBlueScrollProfile; hScrollBar = "dynamic"; vScrollBar = "dynamic"; } new GuiScrollCtrl("Test_Frame3") { profile = GuiBlueScrollProfile; hScrollBar = "dynamic"; vScrollBar = "dynamic"; } new GuiScrollCtrl("Test_Frame4") { profile = GuiBlueScrollProfile; hScrollBar = "dynamic"; vScrollBar = "dynamic"; } }