ghosh123 has asked for the wisdom of the Perl Monks concerning the following question:
Hi , I want to insert some checkbuttons as row into a MListbox widget. I am currently trying with ItemStyle and TList. But ItemStyle only supports image , text , imagetext and window. How can I insert checkbutton then? Please help. Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Insert checkbutton into MListbox
by thundergnat (Deacon) on Feb 02, 2012 at 16:13 UTC | |
I'm not familiar with Mlistbox but after a quick perusal of the docs, it look like it is based on a Listbox primitive rather than one of the tix based List widgets. (TList, Hlist, tixGrid, etc.) Listboxs are designed and optimized to work with text items. I'm not sure if it is possible to make them work with other types of items without major aggravation. For what it is worth, here is an example Checkbuttons in a TList (which IS a tix based List widget)
| [reply] [d/l] |
|
Re: Insert checkbutton into MListbox
by zentara (Cardinal) on Feb 02, 2012 at 17:01 UTC | |
I'm not really a human, but I play one on earth. Old Perl Programmer Haiku ................... flash japh | [reply] [d/l] |
|
Re: Insert checkbutton into MListbox
by Anonymous Monk on Feb 02, 2012 at 16:12 UTC | |
The documentation says that is not supported, a limitation of listbox http://cpansearch.perl.org/src/RCS/Tk-MListbox-1.11/docs/MListbox/tutorial.html | [reply] |
|
Re: Insert checkbutton into MListbox
by Anonymous Monk on Feb 03, 2012 at 05:08 UTC | |
Thanks a lot. It helped. Especially the first document link whic clearly states about its limitaion. | [reply] |
|
Re: Insert checkbutton into MListbox
by chessgui (Scribe) on Feb 03, 2012 at 17:37 UTC | |
| [reply] [d/l] |
by ghosh123 (Monk) on Feb 06, 2012 at 09:23 UTC | |
Hi , Thanks for your reply. Actually my requirement is to insert some checkbuttons into Listbox or MListbox. There will also be two buttons (up and down) beside the listbox which will let me move up/down any selection in the listbox. Suppose, I have "job" "status" , "time", "result" as checkbuttons in the listbox/mlistbox. I need to select/de-select them (which will happen if they are checkbuttons, no issues) and then by pressing the buttons I can re-order the appearence of checkbuttons in the listbox and finally collect the order of their appearence. That means lets say the above order after pressing up/down on any selection will become "time", "result","job" "status" I have already known MListbox does not support packing widgets in them. Listbox is also not working when I am doing the following thing. I have created a composite widget actually with Listbox and so used Subwidget
The above code is giving error when I am doing $style = $listbox->ItemStyle('window'). Now I am trying with TList (tix widget). I am able to pack checkbuttons but moving them up and down is not able to do. Please help. Actually, I already have a main window where I have all the above mentioned items as columns. I want to serve a capability to the user of my tool so that they can hide/show columns in that main window and also can change the order of their appearence. For that, I need a dialog which will provide this listbox facility. Upon selection/deselection of checkbuttons and change of their order in the listbox, I will determine which all column to show in the main window and their order as well. You can also suggest any alternative idea, say with NumEntry. But numEntry will set a number to them by which I will get the order the user wants. But what about hide/show then ? I hope I have explained my requirement better. Thanks . | [reply] [d/l] |
by chessgui (Scribe) on Feb 06, 2012 at 10:49 UTC | |
| [reply] |
by ghosh123 (Monk) on Feb 06, 2012 at 11:18 UTC | |
by chessgui (Scribe) on Feb 06, 2012 at 12:47 UTC | |
| |