BBjTopLevelWindow::setAlwaysOnTop

Description

In BBj 19.10 and higher, this method specifies whether the BBjTopLevelWindow is always positioned on top of other windows.

Syntax

Return Value

Method

void

setAlwaysOnTop(boolean alwaysOnTop)

Parameters

Variable

Description

alwaysOnTop

Specifies whether or not the BBjTopLevelWindow is always positioned over other windows.

 

0 = Not positioned on top of other windows.

1 = Always positioned on top of other windows.

Return Value

None.

Remarks

This is equivalent to the creation flag $00020000$.

Example

rem ' BBjTopLevelWindow::setAlwaysOnTop
sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
flags$ = $00090003$
if msgbox("Always on top?",4+32+256)=6 then flags$=ior(flags$,$00020000$)
window! = sysgui!.addWindow(100,100,225,100,"setAlwaysOnTop",flags$,$$)
window!.setBackColor(sysgui!.makeColor(255,255,255))
window!.setCallback(window!.ON_CLOSE,"EOJ")
flags$ = iff(window!.isAlwaysOnTop(),$0004$,$0000$)
alwaysOnTop! = window!.addCheckBox(101,25,25,175,25,"Always on top",flags$)
alwaysOnTop!.setOpaque(0)
alwaysOnTop!.setCallback(alwaysOnTop!.ON_CHECK_ON,"alwaysOnTopOn")
alwaysOnTop!.setCallback(alwaysOnTop!.ON_CHECK_OFF,"alwaysOnTopOff")
process_events
eoj:
release
alwaysOnTopOn:
  window!.setAlwaysOnTop(1)
  print "alwaysOnTop ",window!.isAlwaysOnTop()
return
alwaysOnTopOff:
  window!.setAlwaysOnTop(0)
  print "alwaysOnTop ",window!.isAlwaysOnTop()
return

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

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.