BBjListButton::setOpenWidth

Description

In BBj 16.0 and higher, this method sets the opened width of a BBjListButton control.

Syntax

Return Value

Method

void

setOpenWidth(int width)

Parameters

Variable

Description

width

Specifies the width of the opened list, if different from the overall width.

Return Value

None.

Remarks

In BBj 20.0 and higher, setting the LEGACY_LIST_OPEN_WIDTH STBL("!COMPAT") option to TRUE will default the open (dropdown) width of BBjListButton and BBjListEdit controls to the control width, truncating any list items that exceed the width of the control. This is equivalent to directly invoking the BBjListButton::setOpenWidth or BBjListEdit::setOpenWidth method.

Example

rem ' BBjListButton::setOpenWidth

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(100,100,250,250,"setOpenWidth",$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")
text$ = ""
for i = 0 to 9
    text$ = text$ + "This is a very long listbutton item " + str(i) + $0a$
next i
listbutton! = window!.addListButton(101,25,25,100,200,text$,$$)
print "BBjListButton::getOpenWidth",listbutton!.getOpenWidth()
listbutton!.setOpenWidth(200)
print "BBjListButton::getOpenWidth",listbutton!.getOpenWidth()
process_events

eoj:
release

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

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