$RESOURCE Snew_bmp AS "_RES\New2.bmp"
$RESOURCE Sopen_bmp AS "_RES\Open.bmp"
$RESOURCE Ssave_bmp AS "_RES\Save.bmp"
$RESOURCE Shelp_bmp AS "_RES\Help.bmp"
$RESOURCE TBarBtn1_BMP AS "_RES\TBarBtn1I.bmp"
$RESOURCE maGrippe AS "_RES\Grip.bmp"
$RESOURCE monFond AS "_RES\BG.bmp"
$INCLUDE "AddMenuItemBitmaps4a.inc"
$INCLUDE "QCoolBarXPv1d.inc"
custBG.BMPHandle = monFond
custGrip.BMPHandle = maGrippe
custGrip.PixelFormat = 2
DIM cb_Edit1 AS QEDIT
DIM cb_Edit2 AS QEDIT
DIM items(3) AS QMENUITEM
items(0).CAPTION = "Test SUBI 1"
items(1).CAPTION = "Test SUBI 2"
items(2).CAPTION = "Test SUBI 3"
items(3).CAPTION = "Test SUBI 4"
DIM popup1 AS QPOPUPMENU
popup1.AddItems (items(0), items(1), items(2), items(3))
DECLARE SUB CBar_Change(ItemIndex AS INTEGER, Me AS QPANEL)
CREATE Form AS QFORM
CAPTION = "QCoolBarXP v1 - Exemple (Version sans scintillement)"
Center
COLOR = IIF(isXP_QTBtn, -2147483638, -2147483636)
CREATE CoolBar2 AS QCoolBarXP
DisableXPTheme = True
DisableXPThemeBG = True
Style = 0
BorderStyle = False
CAPTION = "Barre no2"
Align = 1
imglA.Height = 32
imglA.Width = 32
imglA.AddBMPHandle TBarBtn1_BMP, 0
imglA.AddBMPHandle TBarBtn1_BMP, 0
imglA.AddBMPHandle TBarBtn1_BMP, 0
AddItems ("Btn5", "-", "Btn6", "Btn7", "-")
ItemsCaptionVisible(1, 2)
InsertED_Ctrl (CoolBar2.ItemCount -1, cb_Edit2)
OnChange = CBar_Change
END CREATE
CREATE CoolBar1 AS QCoolBarXP
CAPTION = "Barre no1"
Align = 1
Height = 24
ItemsWidth = 22
imglA.addbmphandle Snew_bmp, 0
imglA.addbmphandle Sopen_bmp, 0
imglA.addbmphandle Ssave_bmp, clPurple
AddItems ("Btn1", "Btn2", "Btn3", "-", "Btn4", "-")
ItemsCaptionVisible(1)
ItemsGroup(1, 1, 2)
InsertED_Ctrl (0, cb_Edit1)
AsignPopupToItem (popup1, 0)
END CREATE
CREATE CoolBar3 AS QCoolBarXP
DisableXPTheme = True
DisableXPThemeBG = True
DisableBG = True
Style = 1
CAPTION = "Barre no3"
Align = 3
Orientation = 1
Width = 24
ItemsWidth = 24
imglA.addbmphandle Snew_bmp, 0
imglA.addbmphandle Sopen_bmp, 0
imglA.addbmphandle Ssave_bmp, clPurple
AddItems ("Btn8", "-", "Btn9", "Btn10", "-")
ItemsCaptionVisible(1, 2)
END CREATE
CREATE SB1 AS QSTATUSBAR
SimplePanel = 1
END CREATE
END CREATE
Form.SHOWMODAL
SUB CBar_Change
SHOWMESSAGE "Vous avez cliquez sur l'item " +STR$(ItemIndex)
SB1.SimpleText = STR$(ItemIndex)
END SUB
|