Page 1 of 1

ListBroswer checkbox

Posted: Tue Dec 15, 2015 9:43 pm
by mritter0
I would like to be able to enable/disable the checkboxes in a listbrowser node. Making it ReadOnly is not what I need. I still want to be able to select the item, just not change the checked state.

Code: Select all

IListBrowser->SetListBrowserNodeAttrs(SelNode,
    LBNA_CheckBoxDisabled,    TRUE,
TAG_DONE);
Probably all types of gadgets could make use of this.

-------------------------------------------

It would also be nice for when a node is ReadOnly, to also give the text the disabled look, by option

Code: Select all

IListBrowser->SetListBrowserNodeAttrs(SelNode,
    LBNA_Disabled,   TRUE,
TAG_DONE);
So the user visually sees it is not selectable. This would also disable any gadgets associated with it.

Re: ListBroswer checkbox

Posted: Wed Dec 16, 2015 12:49 am
by broadblues
mritter0 wrote:I would like to be able to enable/disable the checkboxes in a listbrowser node. Making it ReadOnly is not what I need. I still want to be able to select the item, just not change the checked state.

Code: Select all

IListBrowser->SetListBrowserNodeAttrs(SelNode,
    LBNA_CheckBoxDisabled,    TRUE,
TAG_DONE);
Probably all types of gadgets could make use of this.
Curious request. Why? Perhaps you need to investigate usage of labels and images if you just want to indicate the state of some flag.

It's perfectly possible to slecte a LBN without toggling the checkbox, simply by clicking on the label.


--------------------------------------
It would also be nice for when a node is ReadOnly, to also give the text the disabled look, by option

Code: Select all

IListBrowser->SetListBrowserNodeAttrs(SelNode,
    LBNA_Disabled,   TRUE,
TAG_DONE);
So the user visually sees it is not selectable. This would also disable any gadgets associated with it.
RenderHook is your friend for all non standard rendering.

Re: ListBroswer checkbox

Posted: Fri Dec 18, 2015 12:29 am
by mritter0
It's not a matter of I don't want to accidentally click on the checkbox, I want to be able to toggle selection and toggle enabled/disabled state. Imagine a list of items and you need/want one to be forced on/off, but the item can still be selected, to show other things elsewhere. Pick this item, it forces that item on/off, so disable it so can't be altered until original item is toggled.