icon view in multi-column textbox
BlitzMax Forums/MaxGUI Module/icon view in multi-column textbox
| ||
I came across this very interesting multi-column listview by Ziltch & Cardonic -- but for the life of me can't figure out how to insert icons/images in a column instead of just text. Does anyone else have any ideas on how to accomplish this? |
| ||
IIRC then icons are only supported in the first column (but can be wrong). I tested this just with your example and it works, but you are looking probably to insert it everywhere? |
| ||
Actually, I'm looking to insert it /anywhere/. First column is better than nothing, but I couldn't get it to work there either. If you have a sample that can get it to work in the first column, I'd like to see the code. :-? |
| ||
Here you go:.. Local Window:TGadget = CreateWindow("Erweiterte ListBox f�r BMax", 100, 100, 500, 300, Null, 1) Local ListBox:TGadget = CreateListBox(2,2,ClientWidth(Window)-4,ClientHeight(Window)-4,Window) Local ListBox1_Icons:TPixmap = LoadPixmap:TPixmap( "C:\gridicons.bmp" ) '<<< loaded the iconstrip pixmap Local ListBox1_Strip:TIconStrip = LoadIconStrip:TIconStrip( ListBox1_Icons:TPixmap ) '<<< define as iconstrip SetGadgetIconStrip( ListBox:TGadget , ListBox1_Strip:TIconStrip ) '<<< attach to listbox .. could of course also be done different... .. For Local Row:Int = 0 To 29 AddGadgetItem(ListBox,Row,,Rand(1,5)) '<<<< added here the icon index number as random, just to see something For Local Column:Int = 1 To 4 ModifyListBoxItem(ListBox, Row, Column, "Item " + Row + "/" + Column) Next Next .. |
| ||
Thanks! |