Interface TextControl::getBottomMargin

Description

In BBj 14.0 and higher, this method returns the width of the inside bottom margin of a text control.

Syntax

Return Value

Method

int

getBottomMargin()

Parameters

None.

Return Value

Returns the width of the inside bottom margin of a text control.

Remarks

None.

Example

rem ' margins
sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(50,50,1000,650,"Margins",$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")
text$ = "The quick brown fox jumps over the lazy dog."
 
inpute! = window!.addInputE(100,100,100,300,40,"",255,"",text$)
inpute!.setToolTipText("BBjInputE")
inputeTop! = window!.addInputNSpinner(101,200,50,100,40,$$,"-###0",$$,0,inpute!.getTopMargin())
inputeTop!.setCallback(inputeTop!.ON_SPIN,"topMargin")
inputeLeft! = window!.addInputNSpinner(102,10,100,80,40,$$,"-###0",$$,0,inpute!.getLeftMargin())
inputeLeft!.setCallback(inputeLeft!.ON_SPIN,"leftMargin")
inputeBottom! = window!.addInputNSpinner(103,200,150,100,40,$$,"-###0",$$,0,inpute!.getBottomMargin())
inputeBottom!.setCallback(inputeBottom!.ON_SPIN,"bottomMargin")
inputeRight! = window!.addInputNSpinner(104,410,100,80,40,$$,"-###0",$$,0,inpute!.getRightMargin())
inputeRight!.setCallback(inputeRight!.ON_SPIN,"rightMargin")
 
n = 1234567.89
inputn! = window!.addInputN(200,600,100,300,40,$0000$,"$###,###,###.00-",$$,n,n)
inputn!.setToolTipText("BBjInputN")
inputnTop! = window!.addInputNSpinner(201,700,50,100,40,$$,"-###0",$$,0,inputn!.getTopMargin())
inputnTop!.setCallback(inputnTop!.ON_SPIN,"topMargin")
inputnLeft! = window!.addInputNSpinner(202,510,100,80,40,$$,"-###0",$$,0,inputn!.getLeftMargin())
inputnLeft!.setCallback(inputnLeft!.ON_SPIN,"leftMargin")
inputnBottom! = window!.addInputNSpinner(203,700,150,100,40,$$,"-###0",$$,0,inputn!.getBottomMargin())
inputnBottom!.setCallback(inputnBottom!.ON_SPIN,"bottomMargin")
inputnRight! = window!.addInputNSpinner(204,910,100,80,40,$$,"-###0",$$,0,inputn!.getRightMargin())
inputnRight!.setCallback(inputnRight!.ON_SPIN,"rightMargin")
 
inputd! = window!.addInputD(300,100,300,300,40)
inputd!.setToolTipText("BBjInputD")
inputdTop! = window!.addInputNSpinner(301,200,250,100,40,$$,"-###0",$$,0,inputd!.getTopMargin())
inputdTop!.setCallback(inputdTop!.ON_SPIN,"topMargin")
inputdLeft! = window!.addInputNSpinner(302,10,300,80,40,$$,"-###0",$$,0,inputd!.getLeftMargin())
inputdLeft!.setCallback(inputdLeft!.ON_SPIN,"leftMargin")
inputdBottom! = window!.addInputNSpinner(303,200,350,100,40,$$,"-###0",$$,0,inputd!.getBottomMargin())
inputdBottom!.setCallback(inputdBottom!.ON_SPIN,"bottomMargin")
inputdRight! = window!.addInputNSpinner(304,410,300,80,40,$$,"-###0",$$,0,inputd!.getRightMargin())
inputdRight!.setCallback(inputdRight!.ON_SPIN,"rightMargin")
 
edit! = window!.addEditBox(400,600,300,300,40,text$,$$)
edit!.setToolTipText("BBjEditBox")
editTop! = window!.addInputNSpinner(401,700,250,100,40,$$,"-###0",$$,0,edit!.getTopMargin())
editTop!.setCallback(editTop!.ON_SPIN,"topMargin")
editLeft! = window!.addInputNSpinner(402,510,300,80,40,$$,"-###0",$$,0,edit!.getLeftMargin())
editLeft!.setCallback(editLeft!.ON_SPIN,"leftMargin")
editBottom! = window!.addInputNSpinner(403,700,350,100,40,$$,"-###0",$$,0,edit!.getBottomMargin())
editBottom!.setCallback(editBottom!.ON_SPIN,"bottomMargin")
editRight! = window!.addInputNSpinner(404,910,300,80,40,$$,"-###0",$$,0,edit!.getRightMargin())
editRight!.setCallback(editRight!.ON_SPIN,"rightMargin")
 
password! = window!.addEditBox(500,100,500,300,40,text$,$0400$)
password!.setToolTipText("BBjEditBox (Password)")
passwordTop! = window!.addInputNSpinner(501,200,450,100,40,$$,"-###0",$$,0,password!.getTopMargin())
passwordTop!.setCallback(passwordTop!.ON_SPIN,"topMargin")
passwordLeft! = window!.addInputNSpinner(502,10,500,80,40,$$,"-###0",$$,0,password!.getLeftMargin())
passwordLeft!.setCallback(passwordLeft!.ON_SPIN,"leftMargin")
passwordBottom! = window!.addInputNSpinner(503,200,550,100,40,$$,"-###0",$$,0,password!.getBottomMargin())
passwordBottom!.setCallback(passwordBottom!.ON_SPIN,"bottomMargin")
passwordRight! = window!.addInputNSpinner(504,410,500,80,40,$$,"-###0",$$,0,password!.getRightMargin())
passwordRight!.setCallback(passwordRight!.ON_SPIN,"rightMargin")
 
cedit! = window!.addCEdit(600,600,500,300,40,text$,$0004$)
cedit!.setToolTipText("BBjCEdit")
ceditTop! = window!.addInputNSpinner(601,700,450,100,40,$$,"-###0",$$,0,cedit!.getTopMargin())
ceditTop!.setCallback(ceditTop!.ON_SPIN,"topMargin")
ceditLeft! = window!.addInputNSpinner(602,510,500,80,40,$$,"-###0",$$,0,cedit!.getLeftMargin())
ceditLeft!.setCallback(ceditLeft!.ON_SPIN,"leftMargin")
ceditBottom! = window!.addInputNSpinner(603,700,550,100,40,$$,"-###0",$$,0,cedit!.getBottomMargin())
ceditBottom!.setCallback(ceditBottom!.ON_SPIN,"bottomMargin")
ceditRight! = window!.addInputNSpinner(604,910,500,80,40,$$,"-###0",$$,0,cedit!.getRightMargin())
ceditRight!.setCallback(ceditRight!.ON_SPIN,"rightMargin")
 
listedit! = window!.addListEdit(700,100,700,300,100,text$,$$)
listedit!.setFieldHeight(40)
listedit!.setText(text$)
listedit!.setToolTipText("BBjListEdit")
listeditTop! = window!.addInputNSpinner(701,200,650,100,40,$$,"-###0",$$,0,listedit!.getTopMargin())
listeditTop!.setCallback(listeditTop!.ON_SPIN,"topMargin")
listeditLeft! = window!.addInputNSpinner(702,10,700,80,40,$$,"-###0",$$,0,listedit!.getLeftMargin())
listeditLeft!.setCallback(listeditTop!.ON_SPIN,"leftMargin")
listeditBottom! = window!.addInputNSpinner(703,200,750,100,40,$$,"-###0",$$,0,listedit!.getBottomMargin())
listeditBottom!.setCallback(listeditTop!.ON_SPIN,"bottomMargin")
listeditRight! = window!.addInputNSpinner(704,410,700,80,40,$$,"-###0",$$,0,listedit!.getRightMargin())
listeditRight!.setCallback(listeditTop!.ON_SPIN,"rightMargin")
 
process_events
eoj:
release
 
topMargin:
 event! = sysgui!.getLastEvent()
 id = event!.getControl().getID() - 1
 control! = window!.getControl(id)
 margin = num(event!.getText())
 control!.setTopMargin(margin)
return
 
leftMargin:
 event! = sysgui!.getLastEvent()
 id = event!.getControl().getID() - 2
 control! = window!.getControl(id)
 margin = num(event!.getText())
 control!.setLeftMargin(margin)
return
 
bottomMargin:
 event! = sysgui!.getLastEvent()
 id = event!.getControl().getID() - 3
 control! = window!.getControl(id)
 margin = num(event!.getText())
 control!.setBottomMargin(margin)
return
 
rightMargin:
 event! = sysgui!.getLastEvent()
 id = event!.getControl().getID() - 4
 control! = window!.getControl(id)
 margin = num(event!.getText())
 control!.setRightMargin(margin)
return

See Also

BBjAPI

BBjSysGui

BBjControl

InterfaceTextControl::setBottomMargin

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.