how to set the height of row of a listicon?
Posted: Thu May 26, 2011 8:37 pm
hello:
I got this code from this forum and changed it a little, it uses Gnozal PureColor to color a listicon and change the font.
my problem is that with big characters size, the standard height of row become too small, so how to increase/change it?
thanks
I got this code from this forum and changed it a little, it uses Gnozal PureColor to color a listicon and change the font.
my problem is that with big characters size, the standard height of row become too small, so how to increase/change it?
thanks
Code: Select all
Global FontID1 = LoadFont(0, "Arial", 15)
Global FontID2 = LoadFont(1, "Arial", 15, #PB_Font_Bold)
;
Procedure MyCellColorCallback(GadgetNumber.l, CellRow.l, CellColumn.l, *TextColor.LONG, *BackColor.LONG, *FontID.LONG)
If GadgetNumber = 1
Select CellRow ; first=0
Case 3
*TextColor\l = #Red
*BackColor\l = $82E287
*FontID\l = FontID2
Default
*TextColor\l = #Blue
*BackColor\l = RGB(247, 242, 170)
*FontID\l = FontID1
EndSelect
EndIf
EndProcedure
; Create Window
OpenWindow(0, 100, 300, 400, 200, "PureCOLOR test : cell callback demo", #PB_Window_SystemMenu)
ListIconGadget(1, 1, 1, 350, 190, "0", 100, #PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect)
;
AddGadgetColumn(1, 1, "1", 100)
AddGadgetColumn(1, 2, "2", 100)
AddGadgetItem(1, -1, "0:0" + Chr(10) + "0:1" + Chr(10) + "Red")
AddGadgetItem(1, -1, "1:0" + Chr(10) + "1:1" + Chr(10) + "1:2")
AddGadgetItem(1, -1, "Blue" + Chr(10) + "Green" + Chr(10) + "2:2")
AddGadgetItem(1, -1, "3:0" + Chr(10) + "Red" + Chr(10) + "3:2")
AddGadgetItem(1, -1, "Red" + Chr(10) + "4:1" + Chr(10) + "Red")
AddGadgetItem(1, -1, "Green" + Chr(10) + "Blue" + Chr(10) + "5:2")
AddGadgetItem(1, -1, "6:0" + Chr(10) + "6:1" + Chr(10) + "6:2")
AddGadgetItem(1, -1, "Red" + Chr(10) + "Blue" + Chr(10) + "7:2")
AddGadgetItem(1, -1, "Strike" + Chr(10) + "Strike" + Chr(10) + "Strike")
PureCOLOR_SetCellColorCallback(0, @MyCellColorCallback())
Repeat
EventID.l = WaitWindowEvent()
If EventID = #PB_Event_CloseWindow
Break
EndIf
ForEver
;
End