Quickly Apply Common Properties

Bill Norris

Active Member
Licensed User
Longtime User
Quite often, I employ a similar "theme" on labels, buttons and edittexts throughout my apps. By theme, I mean color, text size, text color, typeface, vertical and horizontal gravity. This necessitates alot of code typing, to individually set these properties of each view. I was wondering if there might be some functionality I am unaware of that could be used to employ some sort of "style". Something like myLabel.style=function_name(mycolor, mytextsize, mytypeface) etc. know I am inventing my own code here but just for clarification.
 

Bill Norris

Active Member
Licensed User
Longtime User
RE:

That would certainly work, although at this point I am adding the buttons/labels in designer, and from what I see, there is no way to create a view array in designer, as it can only be done when adding views dynamically at run time?
 
Upvote 0

timwil

Active Member
Licensed User
Longtime User
How I get around this is....

I create the first button - set the size, text, color and what ever then I duplicate the button and assign a new name to the new button - in the designer of course
 
Last edited:
Upvote 0

Bill Norris

Active Member
Licensed User
Longtime User
RE:

I employ that technique as well, but in this app, several of the appearance properties are set at run time based on the color scheme and font the end users prefers.
 
Upvote 0
Top