Attributes And Methods common to all GoDB tags.

TagName Description Applies GBasic Property GBasic Sample
NAME This attribute lets you specify the name of the control
 
  To all controls
 
  NONE You cannot change the name of the control from gbasic
X This attribute lets you specify the X position of the control   To all controls
 
  X #Fld1.X=100

See Also:Update
Y This attribute lets you specify the Y position of the control   To all controls
 
  Y #Fld1.Y=100

See Also:Update
W This attribute lets you specify the Width of the control  
  To all controls
 
  W

#Fld1.W=100


See Also:Update

H This attribute lets you specify the Height of the control This applies only to Embedded Grid(EGRID) and MULTILINE and ListBox controls.
 
  H

#Fld1.H=100


See Also:Update

SCROLLABLE  This attribute lets you specify if the control scrolls with the page.The default is 1(SCROLLABLE). Specifying 0 will make the control fixed.
 
  To all controls
 
  SCROLLABLE   #Fld1.SCROLLABLE=0
HIDDEN This attribute lets you specify if the control is hidden or not. The default is 0(VISIBLE). Specifying 1 will make the control HIDDEN.

See Also: Hide() and Show() Methods.
 
 To all controls
 
  HIDDEN

print#Fld1.HIDDEN
#Fld1.HIDDEN=0
-------------------------------------
#Fld1.Show()
#Fld1.Hide()

DISABLED This attribute lets you specify if the control is DISABLED or not. The default is 0(NOT DISABLED). Specifying 1 will DISABLE the control.
 
 To all controls
 
  DISABLED #Fld1.DISABLED=1
TAG This attribute lets you an additional string or value to any field.
This is useful for programmers who need name value pairs.

Note: In GBasic When the tag is assigned as a numeric field,
the value is rounded off to three decimal places.
if better precision is needed then tag should be assigned as string using the Format$ function

EX:
#Fld1.TAG=100.123456
print #Fld1.TAG$

Will print
100.123


 
 To all controls
 
TAG$
and
TAG

#Fld1.TAG$="Hello"
print #Fld1.TAG$="Hello"
#Fld1.TAG=100
print #Fld1.TAG
print #Fld1.TAG$


STYLE This attribute lets you specify if the style in the text is displayed.
 
This is a bit masked value.
ValueSTYLE
0Normal ( - Default Left Align )
1Inverted
2UnderLine
4Dotted UnderLine
8BOLD
16Right Align
32Right To Left
64Center Align
128Force Left Align

When a combination of the styles are required then the numbers need to be added up for example, Bold and Invert is 1+8=9
 
  To all controls
 
  STYLE #Fld1.STYLE=0
FG This attribute lets you specify a Foreground color for the control.The color is a 16 bit RGB(565) color. 
 
  To all controls
 
  FG #Fld1.fg=100
BG

This attribute lets you specify a background color for the control.The color is a 16 bit RGB(565) color.

NOTE For Black Color:
If this color is specified as 0 then the Background is not drawn, so to draw a Black  background the value should be 1. This rule applies to BRDR,and SELBG.
 

  To all controls
 
  BG #Fld1.bg=100
BRDR This attribute lets you specify a border color for the control.The color is a 16 bit RGB(565) color. 

Refer BG for Note about Black
  To all controls
 
  BRDR #Fld1.BRDR=100
SELFG This attribute lets you specify selected text color for the control ie.,the color to be used when the control has the focus.The color is a 16 bit RGB(565) color.
 
  To all controls
 
  SELFG #Fld1.SELFG=100
SELBG

This attribute lets you specify selected background color for the control ie.,the color to be used when the control has the focus.The color is a 16 bit RGB(565) color.

Refer BG for Note about Black

  To all controls
 
  SELBG #Fld1.SELBG=100
SELBRDR This attribute lets you specify Selected border color for the control.The color is a 16 bit RGB(565) color. 

Refer BG for Note about Black
  To all controls
 
  SELBRDR #Fld1.SELBRDR=100
FONT This attribute lets you specify font to be used for the control.

   The Valid Font values are

   3- Largest.
   4- Medium.
   5- Smallest.

   Other values are reserved for future.

 
  To all controls
 
FONT #Fld1.font=3
GRAD This attribute lets you specify Gradient Color.   To all controls Except Grid,Tree,GDO,SPIN
 
GRAD #Fld1.GRAD=3
GRADDIR Direction of the Gradient (0-None , 1-Top to Bottom, 2 Bottomto top, 3 Left to Right, 4 Right to Left)   To all controls Except Grid,Tree,GDO,SPIN
 
GRADDIR #Fld1.GRADDIR=3
SELGRAD This attribute lets you specify Selected Gradient Color.   To all controls Except Grid,Tree,GDO,SPIN
 
SELGRAD #Fld1.SELGRAD=3
SELGRADDIR Direction of the Selected Gradient (0-None , 1-Top to Bottom, 2 Bottomto top, 3 Left to Right, 4 Right to Left)   To all controls Except Grid,Tree,GDO,SPIN
 
SELGRADDIR #Fld1.SELGRADDIR=3
RADIUS This attribute lets you specify RADIUS of the Rounded background rect. 0 for this attr will have a standard Rectangle. When Radius is specified the Background rounded rectangle is adjusted so that the Curves donot touch the control edges. To achieve this the background rectangle is made bigger according to the Radius value.   To all controls Except Grid,Tree,GDO,SPIN
 
RADIUS #Fld1.RADIUS=3
Corner Corners to be Rounded (Bitmask 1 Top Left, 2 Top Right, 4 Bottom Left, 8 Bottom Right)  15 will round all the corners (1+2+4+8).   To all controls Except Grid,Tree,GDO,SPIN
 
Corner #Fld1.Corner=3



Methods.
Method Name Description Applies GBasic Method GBasic Sample
Show Displays the control ALL Show() #UID.Show()
Hide Hides the Control ALL Hide() #UID.Hide()
Setfocus This Method Sets the Focus to the Field
 
 To ALL Controls
 
SetFocus()


#NAME.SetFocus() 


Paint This Method Paints the Field
 
 To ALL Controls
 
Paint(PaintNow)

If PaintNowis 1 then the Field is
painted to the screen.

#NAME.Paint(1) 


Move This Method Moves a Field
 
 To ALL Controls
 
Move(Dx,Dy,PaintNow)

DX and DY are the Incremental Positions to move.

If PaintNow is 1 then the Field is
painted to the screen.

#NAME.Move(10,10,1) 




Runtime Only Attributes.
TagName Description Applies GBasic Property GBasic Sample
STARTSEL /  ENDSEL This attribute lets you specify if the index of the starting and ending position of selection.

NOTE: This attribute is available only during runtime.
 
To Text Controls
 
 
print #NAME.starsel
print #NAME.endsel
#NAME.starsel=0
#NAME.endsel=len(#NAME$)
setfocus(\"NAME\")