Jump to content
Sign in to follow this  
iceman77

Disable row in an lb

Recommended Posts

Curious, is it possible to disable any given index in a list box? Meaning, you can still see the text, but it's greyed out & not accessible.

Edited by Iceman77

Share this post


Link to post
Share on other sites

Usually if I want to disable something, in the code I disable the selection with the code.

private["_disabledSels","_sel"];
_disabledSels = [2,4,1];
_sel = lbCurSel 1001; //W/e idc the lb uses
if (_sel in _disabledSels) exitWith {};

Share this post


Link to post
Share on other sites

Hmm. Affraid I don't understand :p. Basically I need something like this:

If (My_variable) Then {LbEnable [2501, 1, True];} Else {LbEnable [2501, 1, False];}

Share this post


Link to post
Share on other sites

Use a combination of lbSetColor and onLBSelChanged-UIEH. You can't make a row inaccessible, but you can hint the user with a greyed-out color and by resetting the selected row with lbSetCurSel when the user selects a disabled row.

Share this post


Link to post
Share on other sites

/sadface - A friend had suggested something similar. But, I've come along way making conquest, to use this sort of a workaround. I guess I'll have to stick with adding/deleting the indexes. Thankyou for the reply though, as it's now clear that it's impossible to do. :(

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×