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

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

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


QCOMBOBOX Component

QCombobox implements a simple pull down listbox. The first item in any combobox is 0, the next is 1, and so on...

QCombobox Properties
FieldTypeR/WDefaultSupport





AlignINTEGERRWalNoneW
Align determines how the control aligns within its parent control.
ColorINTEGERRWW
CopyModeINTEGERRWcmBlacknessW
CursorINTEGERRWcrDefaultW
DropDownCountINTEGERRW8W
DropDownCount is the maximum number of items displayed in the drop-down list.
EnabledINTEGERRWTrueWXG
FontQFONTWW
HeightINTEGERRWWXG
HintSTRINGRWWXG
ItemARRAY of STRINGRWWXG
ItemCountINTEGERRWXG
ItemHeightINTEGERRWW
ItemIndexINTEGERRW-1WXG
ItemIndex indicates which item in the drop-down list is selected. If no item is selected, then ItemIndex is -1.
LeftINTEGERRW0WXG
MaxLengthINTEGERRWW
MaxLength is the maximum number of characters the user can type into the edit portion of the combobox.
ParentQFORM/QPANEL/QTABCONTROLWWXG
PopupMenuQPOPUPMENUWW
ShowHintINTEGERRWFalseWXG
SortedINTEGERRWFalseWG
StyleINTEGERRWcsDropDownW
Style determines the display style of the combobox.
0 = csDropDown -- A drop-down list with an edit box for manually entered text.
1 = csSimple -- A drop-down list with an edit box and a fixed list (list box) underneath.
2 = csDropDownList -- A drop-down list with no edit box for manual entry.
3 = csOwnerDrawFixed -- Owner-draw drop-down list with an edit box. Each item in the list is the height specified by the ItemHeight property.
4 = csOwnerDrawVariable -- Owner-draw drop-down list with an edit box. Each item can have varying heights.
TabOrderINTEGERRWW
TagINTEGERRWWXG
TextSTRINGRWW
TopINTEGERRW0WXG
VisibleINTEGERRWTrueWXG
WidthINTEGERRWWXG

QCombobox Methods
MethodTypeDescriptionParamsSupport





AddItemsSUBIAdd items to comboboxSTRINGs, InfiniteWXG
CircleSUB (x1%, y1%, x2%, y2%, c%, fill%)Draw & Fill Circle6W
ClearSUBClears entire Combobox0WXG
CopyRectSUB (D, Image, S)D and S are QRECTs, Image can be a QImage, QCanvas, or QBitmap3W
DelItemsSUBIDelete items by their indexIndex #s, InfiniteWXG
DrawSUB (x%, y%, BMP)Draw Bitmap at (X,Y)3W
FillRectSUB (x1%, y1%, x2%, y2%, c%)Draws & Fills a rectangle5W
InsertItemSUB (Index%, String$)Insert item at Index%2WXG
LineSUB (x1%, y1%, x2%, y2%, c%)Draws a line5W
PaintSUB (x%, y%, c%, borderc%)Fill Region4W
PsetSUB (x%, y%, c%)Pixel plot3W
RectangleSUB (x1%, y1%, x2%, y2%, c%)Draws a rectangle5W
RepaintSUBForce repainting of combobox0W
RoundRectSUB (x1%, y1%, x2%, y2%, x3%, y3%, c%)Draws & Fills a rounded rectangle7W
StretchDrawSUB (Rect AS QRECT, BMP)Draw BMP and stretch to fit inside Rect2W
TextHeightFUNCTION (Text$) AS WORDReturns the height, in pixels, of Text$ string1W
TextWidthFUNCTION (Text$) AS WORDReturns the width, in pixels, of Text$ string1W
TextRectSUB (Rect AS QRECT, x%, y%, S$, fc%, bc%)Write text, and clip within region Rect6W
TextOutSUB (x%, y%, S$, fc%, bc%)Writes text to image5W

QCombobox Events
EventTypeOccurs when...ParamsSupport





OnChangeVOIDUser selects a different item0WXG
OnDrawItemSUB (Index%, State%, R AS QRect)Items are redrawn for ownerdraw comboboxes3W
OnMeasureItemSUB (Index%, Height%)Calculate Height for ownerdraw variable comboboxes3W


QCombobox Examples
  DIM Form AS QForm
  DIM ComboBox AS QComboBox

  SUB ItemChanged
    PRINT ComboBox.Item(ComboBox.ItemIndex)
  END SUB

  ComboBox.Parent = Form
  ComboBox.OnChange = ItemChanged
  ComboBox.AddItems "1. Apples", "2. Oranges", "3. Bananas"

  Form.ShowModal

Prev Component Contents Next Component
掌柜推荐
 
 
¥289.00 ·
 
 
¥1,080.00 ·
 
 
¥1,380.00 ·
 
 
¥638.00 ·
 
 
¥1,290.00 ·
 
 
¥1,420.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2015-12-25 19:42:30