listicon gadget / gtk_tree_view search problem
Posted: Sat Mar 29, 2008 1:36 pm
for some reason the search function of the listicon gadget doesnt work when there are multiple columns... (search as in start typing in the gadget and it auto searches)
compile this code, first with the addgadgetcolumn lines, 2nd time with them commented. typing something in the stringgadget doesnt produce results with the columns, but does without. (the gtk_tree_view_set_search_entry line make the string gadget be the search box, instead of using gtk one)
anyone know how to fix it?
or is it just my gtk version?
compile this code, first with the addgadgetcolumn lines, 2nd time with them commented. typing something in the stringgadget doesnt produce results with the columns, but does without. (the gtk_tree_view_set_search_entry line make the string gadget be the search box, instead of using gtk one)
Code: Select all
ImportC "/usr/lib/libgtk-x11-2.0.so"
gtk_tree_view_set_search_entry(treeview, stringentry)
EndImport
OpenWindow(0, 0, 0, 700,500, "Xander's Media Library", #PB_Window_ScreenCentered)
CreateGadgetList(WindowID(0))
StringGadget(4, 0, 0, 500, 30, "")
ListIconGadget(3, 0, 31, 700, 469, "Name", 220, #PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
AddGadgetColumn(3, 1, "Age", 200)
AddGadgetColumn(3, 2, "Height", 200)
AddGadgetItem(3, -1, "Alex"+#LF$+"52"+#LF$+"170cm")
AddGadgetItem(3, -1, "Barry"+#LF$+"25"+#LF$+"175cm")
AddGadgetItem(3, -1, "Bradley"+#LF$+"17"+#LF$+"160cm")
AddGadgetItem(3, -1, "Larry"+#LF$+"20"+#LF$+"170cm")
AddGadgetItem(3, -1, "Gary"+#LF$+"2"+#LF$+"170cm")
gtk_tree_view_set_search_entry(GadgetID(3), GadgetID(4))
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
quit = 1
EndSelect
Until quit = 1or is it just my gtk version?