$IFNDEF TRUE
$DEFINE True 1
$ENDIF
$IFNDEF FALSE
$DEFINE False 0
$ENDIF
DECLARE FUNCTION SetParentStatusBar LIB "user32" ALIAS "SetParent" (hWndChild AS LONG,hWndNewParent AS LONG) AS LONG
TYPE QStatusBarEx EXTENDS QSTATUSBAR
SUB AddOptPanel(panel AS QPANEL,index AS INTEGER)
DIM i AS INTEGER
panel.BEVELOUTER=False
panel.BEVELINNER=False
IF panel.height>(QStatusBarEx.height-4) THEN
panel.height=QStatusBarEx.height-4
END IF
IF index>0 THEN
panel.left=4
FOR i=0 TO index-1
panel.left=panel.left+QStatusBarEx.panel(i).width
NEXT i
ELSE
panel.left=2
END IF
IF panel.width>QStatusBarEx.panel(index).width-4 THEN
panel.width=QStatusBarEx.panel(index).width-4
END IF
panel.top=((QStatusBarEx.height-panel.height)/2)+1
SetParentStatusBar panel.handle,QStatusBarEx.handle
IF panel.visible=False THEN panel.visible=true
END SUB
END TYPE
|