Documentation component by D.Glodt  (c)2003 Appendix A: QStringGridExt

QStringGridEx Component

QStringGridEx is identical as QStringGrid allowing the  use of the style of the lines identical to the columns.

          This component uses a template parameter to define the number of  row used.(dim grid have QStringGridEx<Size >)
          The use of  events OnSelectCell and OnDrawCell requires the use of  the key word < inherit >.

QStringGridEx Properties
Field Type R/W Défault





RowStyle ARRAY OF INTEGER R/W
RowStyle determines the style of each row.
2 = grsList -- Row with a drop-down list for each item
1 = grsEllipsis -- Row with an ellipsis button for each item
0 = grsNone -- Normal row
grsNone
RowList ARRAY OF STRING R/W
RowList maintains a list of strings deliminated by LF for use in Row lists.

QStringGridEx Methods
Method Type Description Params





QStringGridEx Events
Event Type Occurs when... Params





QStringGridEx Example
$TYPECHECK ON
$INCLUDE "RAPIDQ.INC"
$INCLUDE "Object\QStringGridEx.inc"
$ESCAPECHARS ON

CONST AgeList = "10\n11\n12\n13\n14\n15\n16\n17\n18\n19"

SUB EllipsisClick (Col AS LONG, Row AS LONG, Sender AS QSTRINGGRID)
  Sender.Cell(Col, Row) = "Comments"+STR$(Row)
END SUB

CREATE Form AS QFORM
    CREATE Grid AS QStringGridEx<1000> '1000 row
        Align=alClient
        AddOptions(goEditing,goColSizing)
        FixedRows=1
        FixedCols=1
        ColCount=3
        RowCount=5
        DefaultRowHeight=20
        DefaultColWidth=100
        RowList(1)=AgeList
        RowStyle(1)=grsList
        RowStyle(2)=grsEllipsis
        Cell(0,0)="Age"
        Cell(1,0)="Comments"
        OnEllipsisClick=EllipsisClick
    END CREATE
    Caption="Dropdown list example"
    Center
END CREATE
    form.ShowModal