Guidance
指路人
g.yi.org
software / RapidQ / RQ Doc / html / qtabcontrol.html

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

  
Appendix A: QTABCONTROL
Rapid-Q Documentation by William Yu (c)1999 Appendix A: QTABCONTROL


QTABCONTROL Component

QTabControl is a tab set that has the appearance of notebook dividers, except it is not made up of several pages.

QTabControl Properties
FieldTypeR/WDefault




AlignINTEGERRWalNone
ButtonStyleINTEGERRWFalse
ClientHeightINTEGERRW
ClientWidthINTEGERRW
ColorINTEGERRW
CursorINTEGERRWcrDefault
EnabledINTEGERRWTrue
FlatButtonsINTEGERRWFalse
FlatSeperatorsINTEGERRWFalse
FocusButtonsINTEGERRWFalse
FontQFONTW
HeightINTEGERRW
HintSTRINGRW
HotTrackINTEGERRWFalse
LeftINTEGERRW0
MultiLineINTEGERRWFalse
ParentQFORM/QPANEL/QTABCONTROLW
PopupMenuQPOPUPMENUW
ScrollOppositeINTEGERRWFalse
ShowHintINTEGERRWFalse
TabARRAY of STRINGRW
TabHeightINTEGERRW
TabInactiveColorINTEGERRW
TabInactiveFontQFONTW
TabIndexINTEGERRW
TabOrderINTEGERRW
TabPositionINTEGERRW
TabWidthINTEGERRW
TagINTEGERRW
TopINTEGERRW0
WidthINTEGERRW
VerticalTabsINTEGERRWFalse
VisibleINTEGERRWTrue

QTabControl Methods
MethodTypeDescriptionParams




AddTabsSUBIAdd tabs to controlSTRING, Infinite
DelTabsSUBIDelete tabs from controlINTEGER, Infinite
InsertTabSUB (Index%, String$)Inserts Tab at Index%2

QTabControl Events
EventTypeOccurs when...Params




OnChangeVOIDTabs change0


QTabControl Examples
'' Tab Control Example for Rapid-Q by William Yu
'' When you hide a container (like QFORM, QTABCONTROL, and QPANEL), all the
'' components within it are also hidden.

$INCLUDE "RAPIDQ.INC"

DECLARE SUB TabChange

CREATE MainForm AS QForm
  Center
  Height = 300
  Width = 350
  Caption = "Tab Control demo"
  CREATE Tab AS QTabControl
    AddTabs "Tab 1","Tab 2","Tab 3","Tab 4"
    Width = MainForm.ClientWidth
    Height = MainForm.ClientHeight
    OnChange = TabChange
    HotTrack = True
    CREATE Panel0 AS QPanel
      Top = 40
      Left = 5
      Width = Tab.ClientWidth - 10
      Height = Tab.ClientHeight - 50
      Caption = "Panel 1"
      BevelInner = bvLowered
      CREATE Button1 AS QButton
        Caption = "Hello world!"
      END CREATE
    END CREATE
    CREATE Panel1 AS QPanel
      Top = 40
      Left = 5
      Width = Tab.ClientWidth - 10
      Height = Tab.ClientHeight - 50
      Caption = "Panel 2"
      BevelInner = bvLowered
      Visible = False
    END CREATE
    CREATE Panel2 AS QPanel
      Top = 40
      Left = 5
      Width = Tab.ClientWidth - 10
      Height = Tab.ClientHeight - 50
      Caption = "Panel 3"
      BevelInner = bvLowered
      Visible = False
    END CREATE
    CREATE Panel3 AS QPanel
      Top = 40
      Left = 5
      Width = Tab.ClientWidth - 10
      Height = Tab.ClientHeight - 50
      Caption = "Panel 4"
      BevelInner = bvLowered
      Visible = False
    END CREATE
  END CREATE
END CREATE


SUB TabChange
  SELECT CASE Tab.TabIndex
    CASE 0
      Panel0.Visible = True
      Panel1.Visible = False
      Panel2.Visible = False
      Panel3.Visible = False
    CASE 1
      Panel1.Visible = True
      Panel0.Visible = False
      Panel2.Visible = False
      Panel3.Visible = False
    CASE 2
      Panel2.Visible = True
      Panel1.Visible = False
      Panel0.Visible = False
      Panel3.Visible = False
    CASE 3
      Panel3.Visible = True
      Panel1.Visible = False
      Panel2.Visible = False
      Panel0.Visible = False
  END SELECT
END SUB


MainForm.ShowModal

Prev Component Contents Next Component
掌柜推荐
 
 
¥860.00 ·
 
 
¥900.00 ·
 
 
¥810.00 ·
 
 
¥317.00 ·
 
 
¥1,370.00 ·
 
 
¥660.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2015-12-25 19:42:49