Use TinyInt to hide/show controls?
Posted
by grady
on Stack Overflow
See other posts from Stack Overflow
or by grady
Published on 2010-05-25T10:22:04Z
Indexed on
2010/05/25
10:31 UTC
Read the original article
Hit count: 198
Hi, I have 6 buttons on my GUI. The visibility of the buttons can be configured via checkboxes. Checking the checkbox and saving means the correpsonding button should be shown. I am wondering if it is somehow possible to have one TinyInt column in the database which represents the visibility of all 6 buttons.
I created an enum for the buttons, it looks like that:
public enum MyButtons
{
Button1 = 1,
Button2 = 2,
Button3 = 3,
Button4 = 4,
Button5 = 5,
Button6 = 6
}
Now I am wondering how to say that for example only button1, button5 and button6 are checked using this one column. Possible at all?
Thanks :-)
© Stack Overflow or respective owner