Referência de Objetos ou componentes

Application
ClipBoard
Printer
QBitMap
QButton
QCanvas
QCheckBox
QComboBox
QComPort
QCoolBtn
QDirTree
QEdit
QFileListBox
QFileStream
QFont
QFontDialog
QForm
QGauge
QGlassFrame
QGroupBox
QHeader
QImage
QImageList
QLabel
QListBox
QListView
QMainMenu
QMemoryStream
QMenuItem
QMySQL
QNotifyIconData
QOpenDialog
QOleObject
QOleContainer
QOutLine
QOvalBtn
QPanel
QPopMenu
QRadioButton
QRect
QRegistry
QRichEdit
QSaveDialog
QScrollBar
QScrolBox
QSocket
QSplitter
QStatusBar
QStringGrid
QStringList
QTabControl
QTimer
QTrackBar
QTreeView
Componente QComboBox (Caixa combinada)

QComboBox implementa uma simples lista de itens que se abre. O primeiro
item na combobox é 0, o próximo é 1, e assim por diante...
Demais componentes    - Click Barra lateral esquerda
Informações adicionais - Click propriedades  em azul
Propriedades de QComboBox
   Campo    Tipo    R/W+    Padrão    Suporte#
 Align
 INTEGER    RW  alNone    W
 Color
 INTEGER    RW      W
 CopyMode
 INTEGER    RW  cmBlackness    W
 Cursor
 INTEGER    RW  crDefault    W
 DropDownCount
 INTEGER    RW  8    W
 Enabled
 INTEGER    RW  True    WXG
 Font
 QFONT    W      W
 Height
 INTEGER    RW      WXG
 Hint
 STRING    RW      WXG
 Item
 ARRAY of STRING    RW      WXG
 ItemCount
 INTEGER    R      WXG
 ItemHeight
 INTEGER    RW      W
 ItemIndex
 INTEGER    RW  -1    WXG
 Left
 INTEGER    RW  0    WXG
 MaxLength
 INTEGER    RW      W
 Parent
 QFORM/QPANEL/QTABCONTROL    W      WXG
 PopupMenu
 QPOPUPMENU    W      W
 ShowHint
 INTEGER    W  False    WXG
 Sorted
 INTEGER    RW  False    WG
 Style
 INTEGER    RW  csDropDown    W
 TabOrder
 INTEGER    RW      W
 Tag
 INTEGER    RW      WXG
 Text
 STRING    RW      W
 Top
 INTEGER    RW  0    WXG
 Visible
 INTEGER    RW  True    WXG
 Width
 INTEGER    RW      WXG
+ R = Propriedade de leitura   W = Propriedade de escrita             #W = Windows  X = Linux  G = Solaris


Métodos de QComboBox
   Método    Tipo    Descrição  Parâmetros  Suporte#
 AddItems
 SUBI  Adiciona itens ao combobox.    STRINGs,Infinite    WXG
 Circle
 SUB (x1%, y1%, x2%, y2%,c%,fill%)  Desenha e preenche Circulo.    6    W
 Clear
 SUB  Limpa o inteiro Combobox.    0    WXG
 CopyRect
 SUB (D, Image, S)          
 DelItems
 SUBI  Apaga itens pelo seu índice.    Index #s, Infinite    WXG
 Draw
 SUB (x%, y%, BMP)  Desenha Bitmap em (X,Y)    3    W
 FillRect
 SUB (x1%, y1%, x2%, y2%, c%)  Desenha e preenche um retângulo.    5    W
 InsertItem
 SUB (Index%, String$)  Insere item em Index.    2    WXG
 Line
 SUB (x1%, y1%, x2%, y2%, c%)  Desenha uma linha.    5    W
 Paint
 SUB (x%, y%, c%, borderc%)  Preenche Região.    4    W
 Pset
 SUB (x%, y%, c%)  Plota Pixel.    3    W
 Rectangle
 SUB (x1%, y1%, x2%, y2%, c%)  Desenha um retângulo.    5    W
 Repaint
 SUB  Força repintura do combobox.    0    W
 RoundRect
 SUB (x1%, y1%, x2%, y2%, x3%, y3%, c%)  Desenha e preenche um retângulo.    7    W
 StretchDraw
 SUB (Rect AS QRECT, BMP)  Desenha BMP e acomoda-o no Rect.    2    W
 TextHeight
 FUNCTION (Text$)AS WORD  Retorna a altura, em pixels, de Text$.    1    W
 TextWidth
 FUNCTION (Text$) AS WORD  Retorna a largura em pixels, de TextRect.    1    W
 TextRect
 SUB (Rect AS QRECT, x%, y%, S$, fc%, bc%)  Escreve texto, e ajusta-o à região Rect.    1    W
 TextOut
 SUB (x%, y%, S$, fc%, bc%)  Escreve texto na imagem.    5    W
#W = Windows  X = Linux  G = Solaris


Eventos de QComboBox
   Evento    Tipo    Ocorre quando...    Parâmetros  Suporte#
 OnChange
 VOID  Usuário seleciona um item diferente.    0    WXG
 OnDrawItem
 SUB (Index%, State%, R AS QRect)  Itens são redesenhados pelo usuário.    3    W
 OnMeasureItem
 SUB (Index%, Height%)  Calcula a altura para as variáveis da ComboBox.    3    W
#W = Windows  X = Linux  G = Solaris


QComboBox exemplo:

 DIM Form AS QForm
 DIM ComboBox AS QComboBox

 SUB ItemChanged
       PRINT ComboBox.Item(ItemIndex)
 END SUB

 ComboBox.Parent = Form
 ComboBox.OnChange = ItemChanged
 ComboBox.AddItems "1. Maçãs", "2. Laranjas", "3. Bananas"

 Form.ShowModal
Sinta-se à vontade para dar sugestões e fazer críticas construtivas.

Anterior           Alto da página           Página Inicial             Próxima