Page 1 of 1
Disabling choices in Scrolling List Field?
Posted: Tue Jul 16, 2013 10:10 pm
by trenatos
Is it possible to disable (Grey out) fields in a scrolling list field?
The idea is to use it as a sort of menu selection where you will have to complete an objective before you're allowed to advance, but it would be nice to be able to see where you are, and the titles of what's coming up in the list.
I know how to get the result of the currently clicked choice, but no idea how to disable or grey out specific choices.
Re: Disabling choices in Scrolling List Field?
Posted: Tue Jul 16, 2013 11:13 pm
by dunbarx
Hi.
set the foreColor of line 3 of fld 1 to "gray"
I suppose you can keep a list, or test the forecolor directly, and disallow any user action in those lines that have that property set.
Craig Newman
Re: Disabling choices in Scrolling List Field?
Posted: Tue Jul 16, 2013 11:52 pm
by trenatos
If I can't actually disable it, just set color, I'll probably just keep a list with approved/not-approved that is checked before displaying the group.
Re: Disabling choices in Scrolling List Field?
Posted: Wed Jul 17, 2013 5:19 am
by dunbarx
You can disable certain lines in a field. In LC, you can do just about anything.
You just have to trap the pertinent messages that are sent when the user clicks in the field, determine if the lines clicked on are grayed out or not, and divert or squash those messages. Do you need help with that?
Craig Newman
Re: Disabling choices in Scrolling List Field?
Posted: Wed Jul 17, 2013 5:50 am
by trenatos
No I'm good, I was trying to figure out if there was a way to actually disable the input (Greyed out, the user not able to click it at all)
Re: Disabling choices in Scrolling List Field?
Posted: Wed Jul 17, 2013 7:49 pm
by dunbarx
Glad you are moving forward.
But when you say that you want the user "not to be able to click at all,do you mean that the cursor would revert to the pointer if it was over a grayed-out line? This can be done.
Craig
Re: Disabling choices in Scrolling List Field?
Posted: Wed Jul 17, 2013 7:57 pm
by trenatos
I understand how I can simply check the line and see if the option is "available" and so on, I was just trying to figure out if there was a simple command in the style of set disabled to true on option XYZ
Instead of having to do all the other work.
Re: Disabling choices in Scrolling List Field?
Posted: Thu Jul 18, 2013 2:41 am
by dunbarx
I see.
There is no built-in style to do that with a list field.
And my post about the cursor made no sense, since a list field is by definition locked, and the pointer persists in any case.
Just to be silly, you could change the cursor to nothing if it hovers over a grayed-out line. That will make your disconcerted users scurry away from the forbidden lines in a hurry.
Craig
Re: Disabling choices in Scrolling List Field?
Posted: Thu Jul 18, 2013 2:48 am
by trenatos
What I think I'll do is look over a list of states on startup and set the colors accordingly, when the user clicks on a list-item it checks the list again to see they should have access or not, and simply not change the current group if they don't.