Fields and predesigned fonts when dragged on form #xpa
Adrian Wick
Hello wizards!
A small question to which I haven't found an answer yet. Sometimes when i drag a field on the form, the field gets font 201 and color 2. What do i have to do in order to always get font 1 and color 2 no matter what field i put on a form or in a table? Where are these settings stored? Regards A
|
|
Frederik Soete
Hi there, Some control properties such as font and color can be inherited from the properties of virtuals or columns or models... Is that what you mean? If you look around in these items' property lists, there are props for GUI, for printing, table or not, etc. You can overrule fonts and colors there. If you wish to remove these overruled properties, you can restore inheritance for the property in question, thus restoring use of default font/color. Bye,
Hello wizards!
|
|
Adrian,
Please keep in mind that over the years, the first 100 fonts and colors have been typically reserved for Magic’s studio. So if you use those colors and fonts, you’re tying your application to how Magic has setup the studio.
Most of us have started with colors and fonts above 100 just to stay away from conflicts.
Also, you might want to think of your colors and fonts as part of “style sheets” where you have a color and font for editable fields in a table. Another color and font for non-editable fields in a table.
Others to consider
Quite a while ago Heidi had made the suggestion to use the same color and font numbers for the same style. So I could set color 150 and font 150 for an Editable Non-Table field. That way when I picked either the color or the font, I didn’t have to look up the other… just put in the same number. Brilliant 😊
The point here is that you don’t just want to set everything to 1 and 2 and you don’t want to just go up and down the font and color table and find an entry that “looks” the way you want for a particular field that end up being grouped with other non-related fields. Your customer wants to change a font or a color on one screen and all of a sudden, you start changing colors or fonts other places in your application you weren’t expecting. You want your application to have a consistent look and feel. This is just one way to help that along.
Keith
From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Adrian Wick
Sent: Friday, June 10, 2022 10:34 AM To: main@magicu-l.groups.io Subject: [magicu-l] Fields and predesigned fonts when dragged on form #xpa
Hello wizards!
|
|
Adrian,
I believe the defaults in this case are "hard-coded" within either the MGCONST file or one of xpa's resource DLLs. The MGCONST file has been hacked in the past for various customizations but, in this case, it's not necessary. Fun? Off-topic. The easiest-to-implement and most-robust way to guarantee consistency in font- and color-usage and simplify change is to create a small HANDFUL of Class:GUI Display models, one for Forms and others for specific types of controls that you place on those forms, such as Edit, Check box, Table, Column, etc. The n all you need to do is to reference one of these models when you place in all of your forms and controls. These five or six Models provide "the defaults" as well as the place to change them globally. It will require an initial investment but, I promise you, you'll be glad you did. BTW, I find Class:GUI Output models to be even more useful for printed output. Steven G. Blank Ξ SGBlank Consulting
|
|
Adrian Wick
Thank you all for your feedbacks.
The problem is i don't have "model" selected and that is why this is bugging me ... So all fields: no models but when dragged to the form, some get font 1 and some get font 201. I will make a screenshot of the form when this will happen again. Regards A
|
|
Adrian Wick
Ok,
it has something to do with the form ... I do have a model on the form and that changes the fonts of labels and fields ... I don't understand why form model has an effect on labels and fields. Without form model: With form model Unless lable font is automatically inherited from form? Maybe the same applies to the table. Thank you guys!!! A
|
|