B4J Question How do you inherit color properties from the Internal Designer, in your code?

B4JExplorer

Active Member
Licensed User
Longtime User
Hi,

Some of the components from the Internal Designer come through as white, when the form is displayed, unless the Color is set in Drawable.


The color in the form, seems to inherit the background color from the Drawable properties. But you have to explicitly set that property in the Abstract Designer, as opposed to using the Color that is automatically generated when you Add that View.


Maybe the real question is, what is the purpose for the Colors that are assigned to the Views/Components inside the Designer? Is that just for convenience, in order to visually distinguish different components during Design? But you still have to explicitly set the colors? Should I just use CSSUtils, for all this?


Sorry for all the questions, I really just need to make sure that I'm on the right track.
 
Last edited:

B4JExplorer

Active Member
Licensed User
Longtime User
Erel,

Sorry, I was out of commission for a few days. I'll put together a sample, later this afternoon, thanks.
 
Upvote 0

B4JExplorer

Active Member
Licensed User
Longtime User
I just recreated one from scratch.
 

Attachments

  • Test.zip
    2 KB · Views: 173
  • DesignerView_20170627.jpg
    DesignerView_20170627.jpg
    188.2 KB · Views: 162
  • CodeView_20170627.jpg
    CodeView_20170627.jpg
    180.6 KB · Views: 283
Upvote 0

B4JExplorer

Active Member
Licensed User
Longtime User
Not sure that I understand. The default color of text fields is white. It looks correct in both the WYSIWYG designer and runtime (based on your screenshots).
Hi Erel,

Maybe I need to rephrase.

In the Abstract Designer, as soon as you Add a View/component, it automatically assigns a color to it. The color doesn't show up in either the WYSIWYG Designer or runtime.


So the question is, what is the purpose for the automatic assignments of colors, in the Abstract Designer? Is it there, only for the convenience of distinguishing the different components, during design?

Does it make any sense, from your pov, to have the option of inheriting the colors from the Abstract Designer? Or for there to be a button, that you can use to manually carry over the Abstract Designer colors, to the form? Or a Generate button, that generates code which populates the components with colors from the Abstract Designer?
 
Upvote 0
Top