corwin42 Expert Licensed User Longtime User Feb 23, 2016 #1 Hello, I'm just playing around with the new customview designer properties. I have a color property but I want it to default to the standard color that the view uses if no explicit color is set. The internal views have a color of "Default color" which uses the default color of the view. Seems that it is not possible to use this for custom views. Setting the default color property to an empty string raises an error. Is there a trick or is this somehow possible?
Hello, I'm just playing around with the new customview designer properties. I have a color property but I want it to default to the standard color that the view uses if no explicit color is set. The internal views have a color of "Default color" which uses the default color of the view. Seems that it is not possible to use this for custom views. Setting the default color property to an empty string raises an error. Is there a trick or is this somehow possible?
Erel B4X founder Staff member Licensed User Longtime User Feb 23, 2016 #2 Custom views currently do not support nullable colors. The best thing that you can do is to set the default color to: 0xfff0f8ff In your code check whether the color value is equal to ViewWrapper.defaultColor. If it is then don't set the color. In the future when nullable colors will be supported this value will be converted to "default color" with a check box.
Custom views currently do not support nullable colors. The best thing that you can do is to set the default color to: 0xfff0f8ff In your code check whether the color value is equal to ViewWrapper.defaultColor. If it is then don't set the color. In the future when nullable colors will be supported this value will be converted to "default color" with a check box.
corwin42 Expert Licensed User Longtime User Jun 9, 2016 #3 Hmm, too bad it seems that this feature didn't make it into the 6.0 beta at least.