Jump to content
softtouch

TControlList and colors/selection

Recommended Posts

I am trying since hours to find a way to disable that a user can select an item from a TControlList, without success.

What I am trying to do is to show all the items, but in some sort of a "viewer" mode, so tuser can see/scroll all the items, but there is no focus drawn and items cannot be selected.

I also tried to change the colors in ItemSelectionOptions, but whatever I set there, it wont change anything. If I set the colors all to lets say clRed, they are still blue.

How can I do what I want to do?

Share this post


Link to post

Add an event handler for OnEnableItem and set AEnabled := False;

Share this post


Link to post
Posted (edited)
43 minutes ago, Uwe Raabe said:

Add an event handler for OnEnableItem and set AEnabled := False;

I already tried that, but the text (label) in the item will be in a typical disabled color (some sort of gray), when I set AEnabled to false, thats also not great.

Edited by softtouch

Share this post


Link to post

You can avoid that by setting MarkDisabledItem to False.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×