I've got a TabPane, and each of its tabs will indicate by color the user's options for the data in that tab.
For example, users with Admin privilege will see a green tab for any tabs requiring Admin privilege. Normal users will see a red tab.
Both user types can click and view any tab, but can only make changes to the data on tabs they see as green.
Admins will probably have all green tabs, while normal users will have some green and some red.
I'm having trouble setting up the CSS styling for this particular UI. I'm not sure it can even be done.
From my research, it looks like I have to go the CSS styling route. Is that true? Are there other ways to style tabs?
Unfortunately, it seems I can't use
because both classes get added to the TabPane itself as I iterate over and add each new tab.
Any ideas as to the best way to accomplish this?
The four states are:
admin (lightgreen)
user (lightred)
selected admin (green)
selected user (red)
For example, users with Admin privilege will see a green tab for any tabs requiring Admin privilege. Normal users will see a red tab.
Both user types can click and view any tab, but can only make changes to the data on tabs they see as green.
Admins will probably have all green tabs, while normal users will have some green and some red.
I'm having trouble setting up the CSS styling for this particular UI. I'm not sure it can even be done.
From my research, it looks like I have to go the CSS styling route. Is that true? Are there other ways to style tabs?
Unfortunately, it seems I can't use
B4X:
if isAdminTab then
TabPane1.StyleClasses.Add("admin")
else
TabPane1.StyleClasses.Add("user")
end if
because both classes get added to the TabPane itself as I iterate over and add each new tab.
Any ideas as to the best way to accomplish this?
The four states are:
admin (lightgreen)
user (lightred)
selected admin (green)
selected user (red)