CheckedListBox? [Solved]

BlitzMax Forums/MaxGUI Module/CheckedListBox? [Solved]

RustyKristi(Posted 2016) [#1]
Basically I just need a checkbox on the left side of every listbox item. It's kind of weird why this is not supported in MaxGUI as I would assume. The only thread that comes close is this one:

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

and some for sale Logic GUI max module which is not an option for me..

Anyone already got something on this?


Henri(Posted 2016) [#2]
Hi RK,

as I understand it, setting checkboxes for listbox is slightly more complicated, but treeview supports this by default and you can use treeview as same.

Example_1 (functions found in joshk's post):



Other option would be to use multicolumn listbox which has a checkbox-style. If you are super interested in that, I can cook something up perhaps (I'm a father of 3 under 6 years old so life is hectic somedays :-)).

-Henri


RustyKristi(Posted 2016) [#3]
Thanks Henri! :D I think the treeview solution works ok for now, wow good one! It also looks like the same thing.

I did a little bit of searching and the checklistbox feature is under System.Windows.Forms.Dll which is in dot net. It also says on MSDN that it is supported under vc 2008 but can't find any related example. I was thinking of doing the ol' dll hook thing just like what you do on other native windows or mfc functions.

https://msdn.microsoft.com/en-us/library/system.windows.forms.checkedlistbox(v=vs.90).aspx

The last thing yes but not in a rush, I'm definitely interested but it is not that important and the treeview example looks great anyway, and of course family time comes first. :-)

cheers and thanks again, awesome solution right there!


RustyKristi(Posted 2016) [#4]
btw, is it possible to control the item list position?, there seems to be a huge space there where the dotted lines are hidden.


Henri(Posted 2016) [#5]
Hi,

that space is due to 'root' item which isn't shown, but reserves the space. I'm sure there's something to be done about that. Obvious one would of course to only add root items, but default MaxGUI command doesn't allow this as far as I know, so you would have to implement custom 'AddItem' command. I'll look in to it after work.

-Henri


RustyKristi(Posted 2016) [#6]
Ok, thanks Henri! :D