BUI logo DWC logo BBjPopupMenu::removeAttribute

Description

In BBj 22.13 and higher, this method removes a popup menu attribute.

Syntax

Return Value Method
void removeAttribute(String attribute)

Parameters

Parameter Description
attribute Specifies an attribute to be removed from the popup menu.

Return Value

None.

Remarks

This functionality is primarily intended for manipulating low-level BUI element attributes or DWC component attributes. When running in GUI, the attributes don't affect the control itself, but may be used by the developer.

Example

rem ' BBjPopupMenu::removeAttribute

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()

title$ = "BBjPopupMenu::removeAttribute"

window! = sysgui!.addWindow(100,100,400,400,title$,$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")

control! = window!.addButton(100,125,25,250,25,"Control with a popup menu",$$)

popup! = control!.addPopupMenu()
item! = popup!.addMenuItem(-1,"Popup Menu Item")

window!.addStaticText(201,5,75,100,25,"Attribute:",$8000$)
window!.addStaticText(202,5,125,100,25,"Value:",$8000$)
attribute! =  window!.addEditBox(101,125,75,250,25,"attribute",$$)
value! =  window!.addEditBox(102,125,125,250,25,"",$$)
setAttribute! = window!.addButton(103,125,175,250,25,"setAttribute",$$)
setAttribute!.setCallback(setAttribute!.ON_BUTTON_PUSH,"setAttribute")
getAttribute! = window!.addButton(104,125,225,250,25,"getAttribute",$$)
getAttribute!.setCallback(getAttribute!.ON_BUTTON_PUSH,"getAttribute")
hasAttribute! = window!.addButton(105,125,275,250,25,"hasAttribute",$$)
hasAttribute!.setCallback(hasAttribute!.ON_BUTTON_PUSH,"hasAttribute")
removeAttribute! = window!.addButton(106,125,325,250,25,"removeAttribute",$$)
removeAttribute!.setCallback(removeAttribute!.ON_BUTTON_PUSH,"removeAttribute")

process_events

eoj:
   release

setAttribute:
  attribute$ = attribute!.getText()
  value$ = value!.getText()
  popup!.setAttribute(attribute$,value$)
return

getAttribute:
  attr$ = attribute!.getText()
  attr! = popup!.getAttribute(attr$)
  i = msgbox("value = """ + str(attr!) + """",0,"getAttribute "+attr$)
return

hasAttribute:
  attr$ = attribute!.getText()
  has! = popup!.hasAttribute(attr$)
  i = msgbox("has "+attr$+" = "+Boolean.toString(has!),0,"hasAttribute "+attr$)
return

removeAttribute:
  attr$ = attribute!.getText()
  popup!.removeAttribute(attr$)
return

See Also

BBjAPI

BBjSysGui

BBjWindow

CSS API

Element.classList

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