BBjMenuButton::setDropdownButtonWidth

Description

In BBj 15.0 and higher, this BBjMenuButton method sets the width of the dropdown button on the right edge of the menu button.

Syntax

Return Value

Method

void

setDropdownButtonWidth(int width)

Parameters

Variable

Description

width

Width of the dropdown button on the right edge of the menu button.

Return Value

None.

Remarks

None.

Example

rem ' BBjMenuButton::setDropdownButtonWidth

sysgui = unt

open (sysgui)"X0"

sysgui! = bbjapi().getSysGui()

title$ = "setDropdownButtonWidth"

window! = sysgui!.addWindow(100,100,250,225,title$,$00090003$)

window!.setCallback(window!.ON_CLOSE,"eoj")

menubutton! = window!.addMenuButton(101,25,25,200,25,"MenuButton",$4000$)

dropdown! = sysgui!.addPopupMenu()

dropdown!.addMenuItem(-201,"Dropdown Item 1")

dropdown!.addMenuItem(-202,"Dropdown Item 2")

menubutton!.setDropdownMenu(dropdown!)

print "BBjMenuButton::getDropdownButtonWidth:",

width = menubutton!.getDropdownButtonWidth()

print width

window!.addStaticText(102,0,128,100,25,"Width:",$8000$)

spinner! = window!.addInputNSpinner(103,125,125,100,25,5,55)

spinner!.setValue(width)

spinner!.setCallback(spinner!.ON_SPIN,"setDropdownButtonWidth")

process_events

eoj:

release

setDropdownButtonWidth:

event! = sysgui!.getLastEvent()

width$ = event!.getText()

width = num(width$)

menubutton!.setDropdownButtonWidth(width)

return

See Also

BBjAPI

BBjSysGui

BBjWindow

BBjControl

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