Sign in to follow this  

C#: How to make form elements user un-selectable?

This topic is 3845 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

C# gurus, I want to create a GUI form to display information and don't want any user inputs. 1. Is there a way to make radio-buttons user un-selectable? I want my program to control which radio-button to select and display it to the user. I don't want to disable or make the buttons invisible. 2. Is there a way to make the rows/cells/columns in a DataGridView table user un-selectable? I already set up the table to be read-only and MultiSelect=false, but that still doesn't do the trick.

Share this post


Link to post
Share on other sites
Quote:
Original post by faculaganymede
I want to create a GUI form to display information and don't want any user inputs.

Usually, when you want a standard control to act in a non-standard way the easiest solution is build a custom control inheriting it or including it inside and controlling it's behaviour.

For example:
- create a custom control,
- put a radiobutton inside,
- capture any click in your control,
- manage the selections yourself.

There are other solutions but when I start needing custom behaviors I usually save time by taking complete control and managing the behavior myself.

Share this post


Link to post
Share on other sites

This topic is 3845 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

Sign in to follow this