Creation/Dev/Script/Client/GuiFrameSetCtrl: Difference between revisions

From Graal Bible
No edit summary
(Added picture, description and an example script)
Line 1: Line 1:
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 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";
    }
  }

Revision as of 18:04, 16 September 2006

Inherits GuiControl.

Description

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


Variables

autobalance - boolean

bordercolor - string

borderenable - string

bordermovable - string

borderwidth - integer

columncount - integer

frames[x,y] - array of TFrameDetail

fudgefactor - integer

minextent - string

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";
   }
 }