CheckListBox

BlitzMax Forums/MaxGUI Module/CheckListBox

degac(Posted 2009) [#1]
As there is any solution to manage a listbox + checkable items (and I can't found anymore the Leadwerks(?) hack to the 'standard' MaxGUI ListBox...) I made this gadget...

At the moment is tested ONLY on Windows XP



Not very exciting, but it seems to works well

You need (at the moment, until I find a way to 'codify-in-the-source-code' the checkbox images) the following image-iconstrip



And now the incredible code

I tried to use the MaxGUI-built in State_button, but I failed, so I prefered to use my own status[] array to keep this information.

I'm planning to add some other function like Invert() to change the check-state with a single command, but at the moment I've not found a MaxGUI method-function to map it.

Any comments, improvements, suggestions or critics are welcomed.


degac(Posted 2009) [#2]
Just discovered FLTK ListBox doesnt' support icons...so my experiment is already ended.
I will check with new ways (panel+checkbox gadgets...)


Ked(Posted 2009) [#3]
Why can't you just use a panel, some labels, scrollbars, and checkboxes?


degac(Posted 2009) [#4]

Why can't you just use a panel, some labels, scrollbars, and checkboxes?


I'm trying this way...

Edited: see my last post


degac(Posted 2009) [#5]
I'm feel very, very stupid...

http://www.blitzbasic.com/codearcs/codearcs.php?code=2290

I've already made times ago a checkboxlist (...sort of) and made it public in the code archives...

I will re-work it to create a standard MaxGUI interface...


degac(Posted 2009) [#6]
WIP (95% - it misses RemoveGadgetItem, Extra gadget full supports, and icon supports at the moment)

Now completed (I think), tested only on WIN32 - Linux (Ubuntu 9.04)





Plain MaxGUI code, standard interface, so it should works on every platform without too much problems.

Supported 'commands':

AddGadgetItem (the FLAGS=1 means Checked)
ModifyGadgetItem
ClearGadgetItems
SelectedGadgetItems
CountGadgetItems
Disable/EnableGadget
Setgadgetcolor
GadgetItemText
GadgetItemExtra
RemoveGadgetItem
SetGadgetIconStrip
SelectGadgetItem *
DeselectGadgetItem *
ToggleGadgetItem *

* Index= -1 means select all the items

It supports now Pixmaps/Iconstrip




MacSven(Posted 2012) [#7]
Does not work under MacOS X.