based on Rapid-Q Documentation by William Yu (c)1999 Custom components: QBEVEL


QBevel Component

Qbevel implements a generic container for your components.

 This component duplicates the Delphi TBevel.
' Not an entirely revolutionary thing, but as  with most of my components, something to save
' time and coding. Play around with the combo  boxes to see the effects. Rather simple
' actually, only two new properties: Shape and  Style. I think you'll find them pretty self- explanatory...
' psyclops420 <psyclops420@yahoo.com>

 

QBevel Properties   (QBEVEL EXTENDS QPANEL)

FieldType R/WDefault Support
AlignINTEGERRWalNoneW
AlignmentINTEGERRWtaCenterW
'Style    
 CONST bsLowered = 0
CONST bsRaised = 1
 
   
'Shape'    
 CONST bsSpacer = 0
CONST bsBox = 1
CONST bsTopLine = 2
CONST bsBottomLine = 3
CONST bsLeftLine = 4
CONST bsRightLine = 5
CONST bsFrame = 6
   
BevelInnerINTEGERRWbvNoneW
BevelOuterINTEGERRWbvRaisedW
BevelWidthINTEGERRW1W
BorderStyleINTEGERRWbsNoneW
 '-- Bevel Style
CONST bvNone = 0
CONST bvLowered = 1
CONST bvRaised = 2

'-- Bevel Border
CONST bpNone = 0 '-- No visible border
CONST bpSingle = 1 '-- Single-line border
 
   
CaptionSTRINGRWW
ClientHeightINTEGERRWWX
ClientWidthINTEGERRWWX
ColorINTEGERRWW
CursorINTEGERRWcrDefaultW
EnabledINTEGERRWTrueWX
FontQFONTWW
HeightINTEGERRWWX
HintSTRINGRWW
LeftINTEGERRW0WX
ParentQFORM/Qbevel/QTABCONTROLWWX
ShowHintINTEGERRWFalseW
TabOrderINTEGERRWW
TagINTEGERRWWXG
TopINTEGERRW0WX
WidthINTEGERRWWX
VisibleINTEGERRWTrueWX

Qbevel Methods
MethodTypeDescriptionParamsSupport





RepaintSUBRefreshes panel and all contents0W

Qbevel Events
EventTypeOccurs when...ParamsSupport





OnClickVOIDUser clicked on open area of panel0WX
OnDblClickVOIDUser double clicked panel0W
OnMouseDownSUB (Button%, X%, Y%, Shift%)Mouse button held down4W
OnMouseMoveSUB (X%, Y%, Shift%)Mouse moves over panel3W
OnMouseUpSUB (Button%, X%, Y%, Shift%)Mouse button is released4W


Qbevel Examples
 
'================================================= 
'        Sample program 
'================================================= 

DECLARE SUB ChangeStyle
DECLARE SUB ChangeShape

CREATE Form AS QFORM
    CREATE Menu AS QMAINMENU
        CREATE Item AS QMENUITEM
            Caption = "Menu"
        END CREATE
    END CREATE
    CREATE ToolBar AS QBEVEL
        Align = 1
        Height = 50
        Shape = bsTopLine
        Caption = "ToolBar"
    END CREATE
    CREATE Bevel AS QBEVEL
        Top = 80
        Left = 30
        Width = 130
        Height = 30
        color=&h0000ff
        font.color=&hffffff
        caption="Bevel"
        BevelWidth=9
    END CREATE
    CREATE Style AS QCOMBOBOX
        Top = 150
        Left = 10
        AddItems "bsLowered", "bsRaised"
        ItemIndex = 0
        OnChange = ChangeStyle
    END CREATE
    CREATE Shape AS QCOMBOBOX
        Top = 150
        Left = 160
        AddItems "bsSpacer", "bsBox", "bsTopLine", "bsBottomLine", "bsLeftLine", "bsRightLine", "bsFrame"
        ItemIndex = 0
        OnChange = ChangeShape
    END CREATE
END CREATE

Form.ShowModal

SUB ChangeStyle
    Bevel.Style = Style.ItemIndex
END SUB

SUB ChangeShape
    Bevel.Shape = Shape.ItemIndex
END SUB 


Prev Component Contents Next Component