CONST grsList=2
CONST grsEllipsis=1
CONST grsNone=0
TYPE QStringGridEx<Size> EXTENDS QSTRINGGRID
Public:
RowStyle(Size) AS INTEGER
RowList(Size) AS STRING
Private:
SUB SetStyle(Col AS INTEGER,Row AS INTEGER)
IF QStringGridEx.RowStyle(Row)<>0 THEN
IF QStringGridEx.RowStyle(Row)=2 THEN
QStringGridEx.ColumnList(Col)=QStringGridEx.RowList(Row)
QStringGridEx.ColumnStyle(Col)=0
ELSEIF QStringGridEx.RowStyle(Row)=1 THEN
QStringGridEx.ColumnStyle(Col)=1
END IF
ELSE
QStringGridEx.ColumnStyle(Col)=2
END IF
END SUB
EVENT OnSelectCell(Col AS INTEGER,Row AS INTEGER,CanSelect AS INTEGER)
QStringGridEx.SetStyle Col,Row
END EVENT
EVENT OnDrawCell(Col AS INTEGER,Row AS INTEGER,State AS INTEGER,Rect AS QRECT)
IF Row=QStringGridEx.Row THEN QStringGridEx.SetStyle Col,Row
END EVENT
END TYPE
|