Guidance
指路人
g.yi.org
software / rapidq / Examples / QObject / QCoolBarXP / QCoolBarXPv1_Exemple.bas

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
     $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)
        'ItemsEnabled(0, 0, 3)
       InsertED_Ctrl (CoolBar2.ItemCount -1, cb_Edit2)
       OnChange = CBar_Change
      END CREATE
      CREATE CoolBar1 AS QCoolBarXP
        'DisableXPTheme = True
        'DisableXPThemeBG = True
        'Style = 1
       CAPTION = "Barre no1"
       Align = 1
       Height = 24
       ItemsWidth = 22
       imglA.addbmphandle Snew_bmp, 0 'clPurple 'transparentColor
       imglA.addbmphandle Sopen_bmp, 0 'clPurple 'transparentColor
       imglA.addbmphandle Ssave_bmp, clPurple 'transparentColor
       AddItems ("Btn1", "Btn2", "Btn3", "-", "Btn4", "-")
        'ShowItemsCaption(Value, Items Index...)
       ItemsCaptionVisible(1) ', 0, 1, 2)
       ItemsGroup(1, 1, 2)
        'ItemsDown(1, 1, 2)
        'ItemsEnabled(0, 0, 1, 4)
       InsertED_Ctrl (0, cb_Edit1)
        'InsertED_Ctrl (CoolBar1.ItemCount -1, cb_Edit2)
       AsignPopupToItem (popup1, 0)
        'OnChange = CBar_Change
      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 'clPurple 'transparentColor
       imglA.addbmphandle Sopen_bmp, 0 'clPurple 'transparentColor
       imglA.addbmphandle Ssave_bmp, clPurple 'transparentColor
       AddItems ("Btn8", "-", "Btn9", "Btn10", "-")
       ItemsCaptionVisible(1, 2)
        'OnChange = CBar_Change
      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
掌柜推荐
 
 
¥477.00 ·
 
 
¥918.00 ·
 
 
¥370.00 ·
 
 
¥271.00 ·
 
 
¥995.00 ·
 
 
¥1,580.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2013-06-19 07:50:28