Interface MultiSourceEvent::getTabCtrl

 


Description

In BBj 7.0 and higher, this method calls SysGuiEvent::getControl() and casts the return value to a BBjTabCtrl.

Syntax

Return Value

Method

BBjTabCtrl

getTabCtrl()

Parameters

None.

Return Value

Returns the BBjTabCtrl that is the source of the event.

Remarks

If the source of the event is not a BBjTabCtrl, then this method will throw an !ERROR=26.

Example

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 Also

BBjAPI

BBjSysGui

BBjSysGuiEvent::getControl

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.