Interface TextControl::getPlaceholder

Description

In BBj 16.0 and higher, this method returns the placeholder text to be shown when the text control is empty.

Syntax

Return Value

Method

string

getPlaceholder()

Parameters

None.

Return Value

Returns the placeholder text to be shown when the text control is empty.

Remarks

None.

Example

rem ' placeholder.txt

sysgui = unt
open (sysgui)"X0"
print (sysgui)'scale'(1,1)
sysgui! = bbjapi().getSysGui()

rem ' BBjWindow
window! = sysgui!.addWindow(100,100,300,220,"Placeholder",$00090003$,$$)
window!.setCallback(window!.ON_CLOSE,"eoj")

rem ' Spinner List
list! = bbjapi().makeVector()
list$ = ""
restore countries
while 1
    dread item$,end=*break
    list!.add(item$)
    list$ = list$ + item$ + $0a$
wend

rem ' BBjInputE
control! = window!.addInputE(101,10,10,125,25,$0000$,255," ",0,"","")
control!.setPlaceholder("BBjInputE")
control!.setToolTipText("BBjInputE")
print control!.getPlaceholder()

rem ' BBjInputESpinner
control! = window!.addInputESpinner(102,145,10,145,25,list!)
control!.setText("")
control!.setPlaceholder("BBjInputESpinner")
control!.setToolTipText("BBjInputESpinner")
print control!.getPlaceholder()

rem ' BBjInputN
mask$="-###,###,###"
control! = window!.addInputN(103,10,40,125,25,$0000$,mask$,$00$,0,0)
control!.setPlaceholder("BBjInputN")
control!.setToolTipText("BBjInputN mask="+mask$)
print control!.getPlaceholder()

rem ' BBjInputNSpinner
mask$="-###,###,###"
control! = window!.addInputNSpinner(104,145,40,145,25,$0000$,mask$,$00$,0,0)
control!.setPlaceholder("BBjInputNSpinner")
control!.setToolTipText("BBjInputNSpinner mask="+mask$)
print control!.getPlaceholder()

rem ' BBjInputD
control! = window!.addInputD(105,10,70,125,25,$0000$,"",$00$,0,0)
control!.setText("")
control!.setPlaceholder("BBjInputD")
control!.setToolTipText("BBjInputD locale="+stbl("!LOCALE")+" mask="+control!.getMask())
print control!.getPlaceholder()

rem ' BBjInputDSpinner
control! = window!.addInputDSpinner(106,145,70,145,25,$0000$,"",$00$,0,0)
control!.setText("")
control!.setPlaceholder("BBjInputDSpinner")
control!.setToolTipText("BBjInputDSpinner locale="+stbl("!LOCALE")+" mask="+control!.getMask())
print control!.getPlaceholder()

rem ' BBjEditBox
control! = window!.addEditBox(107,10,100,125,25,"",$0000$)
control!.setPlaceholder("BBjEditBox")
control!.setToolTipText("BBjEditBox")
print control!.getPlaceholder()

rem ' BBjEditBoxSpinner
control! = window!.addEditBoxSpinner(108,145,100,145,25,list!)
control!.setText("")
control!.setPlaceholder("BBjEditBoxSpinner")
control!.setToolTipText("BBjEditBoxSpinner")
print control!.getPlaceholder()

rem ' BBjEditBox (Password)
control! = window!.addEditBox(109,10,130,125,25,"",$0400$)
control!.setPlaceholder("BBjEditBox (Password)")
control!.setToolTipText("BBjEditBox (Password)")
print control!.getPlaceholder()

rem ' BBjListEdit
control! = window!.addListEdit(110,145,130,145,145,list$)
control!.setFieldHeight(25)
control!.setPlaceholder("BBjListEdit")
control!.setToolTipText("BBjListEdit")
print control!.getPlaceholder()

rem ' BBjCEdit
control! = window!.addCEdit(111,10,160,280,50,$$,$0104$)
control!.setPlaceholder("BBjCEdit")
control!.setToolTipText("BBjCEdit")
print control!.getPlaceholder()

process_events

eoj:
release

countries:
    data "Germany"
    data "United States"
end

See Also

BBjAPI

BBjSysGui

BBjControl

Interface TextControl::setPlaceHolder

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