|
Return Value |
Method |
getStandardGrid() |
None.
Returns the BBjStandardGrid that is the source of the event.
If the source of the event is not a BBjStandardGrid, then this method will throw an !ERROR=26.
open(unt)"X0"
sg!=BBjAPI().getSysGui()
win! = sg!.addWindow(10,10,300,300,"")
cedit! = win!.addCEdit(101, 10,10,80,140,"cedit")
button! = win!.addButton(102, 10,210,80,40,"button")
handler! = new EventHandler()
cedit!.setCallback(cedit!.ON_GAINED_FOCUS, handler!, "handleEvent")
button!.setCallback(button!.ON_GAINED_FOCUS, handler!, "handleEvent")
process_events
class public EventHandler
field public BBjControl control!
method public void handleEvent(MultiSourceEvent event!)
#control! = event!.getCEdit(err = getButton)
print "CEdit received focus"
methodret
getButton:
#control! = event!.getButton(err = getWindow)
print "button received focus"
methodret
getWindow:
#control! = event!.getTopLevelWindow()
print "window received focus"
methodret
methodend
classend
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.
Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.