BBjMenuButton::setDropdownButtonWidth

Description

In BBj 15.00 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(number width)

Parameters

Parameter Description
width Width of the dropdown button on the right edge of the menu button.

Return Value

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,"DropdownItem 1")
dropdown!.addMenuItem(-202,"DropdownItem 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

BBjControl

BBjWindow

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