line_border default color

If I set the form-border to line 10px en choose the default color, the little icon shows indeed the default color. If I go out of design mode the line is black!

I want this to be the default color (this can be different if you use different LAF)

Can this be fixed?

Have you tried modifying the form border color in the Style? Maybe something there is overriding what you set in Properties for the form.

??

kazar

nope, that’s not the case.

Does it work in your case?

Yes, I do, sorry, even with no style applied to the form. I went through all the form-border options (I noticed that Matte and Special Matte were set to black) and changed them all to Default (in caes the settings for one border style were somehow being inherited). Then I set it back to Line before clicking OK. When I exit Designer the 10-px Line border is still black.

kazar

I wrote:

Yes, I do, sorry, even with no style applied to the form

I meant, “I do see the problem you’re talking about.”

I should add that I’ve never played with the form border before … in the online help, though, it does make clear that “DEFAULT” values will be determined by the LAF.

I’ll keep twiddling with it & will share my observations if I have anything that might be of use to say!

kazar

Harjo,

When you say the default color shows on “the little icon” I imagine you mean in the Preview at the bottom of the border properties dialog. This is what I’ve found about that dialog in playing with it today, and forgive me if any or all of this is obvious to you:

If you want a specific color (and it does sound like you want a specific color, click the color swatch and instead of clicking the Default button to dismiss the dialog, click the OK button. Your form border will be the color you selected.

On the other hand, if you click the Default button, the form border color will default to whatever the LAF dictates, since the LAF apparently is higher in the object hierarchy than design-time properties. And from what I can see, the default form-bordrer color for all LAF’s I have installed is indeed Black.

If the above does not apply (or was already obvious) please describe what you mean by seeing the default color on “the little icon.” From what I can tell if you choose the Default button it does not change anything about any previously selected color in the Preview area of the dialog, it simply dismisses the dialog and leaves the property set to Default. So I’m unclear on which object in the dialog you feel is displaying the color you expect to see in the border …

Hope that was clear,

kazar

On the other hand, if you click the Default button, the form border color will default to whatever the LAF dictates, since the LAF apparently is higher in the object hierarchy than design-time properties. And from what I can see, the default form-bordrer color for all LAF’s I have installed is indeed Black.

Indeed! and that is (I think) not right!

I see the right color when I choose the border-property of a form, than choose for Line. There you see two lines one for color and one for line thikness. If I choose the color popup and there choose for default. than the default color is shown in the line-dialog. only the line becomes always black at the end. :cry:
I think Servoy should take a look at it.

If I choose the color popup and there choose for default. than the default color is shown in the line-dialog. only the line becomes always black at the end.

… and that’s what I think the misunderstanding is regarding how the “Choose A Color” dialog itself, and the buttons in it, works. It sounds like you are selecting a color and then clicking the Default button. In your mind, then, clicking the Default button will change the default form border-color for the LAF itself.

In my mind, this is not the case – and my testing bears out this alternate explanation:

Regardless of what color you choose, clicking the Default button instructs Servoy to refer to the LAF for the LAF’s default border-color. If you click Default you will see in the Properties pane that for color of the form border is “null”.

– In other words, clicking on the Default button does NOT change the default color of the LAF, you would have to edit the LAF itself directly, I believe, to make that change. (But someone correct me if I’m wrong!)

– If you want to set a non-default color as the border color, after choosing a color, click the “OK” button, not the “Default” button.

If you want a default border width, type, color, etc. that overrides the LAF every time you create a new form, create a Style and use the border-color, border-style, border-width etc. properties. Then apply that style to your forms.

So, to sum up:

  1. Try just clicking the OK button instead of the Default button when you are ready to exit the “Choose A Color” window for the border properties.

  2. If you want that color, width, etc. border around all your forms (or many of them), create a style…

  3. If I am wrong and the Default button is supposed to edit the LAF’s defaults, my apologies for all this wasted bandwidth.

I hope something in here is of some help,

kazar

Yes you are right, if I click OK I’ll get the right color, but…
if I change (or my customer changes) the LAF, the border-line is still shown THAT color.

I want it to behave just as the backround color of a form. If you set this to default, the background adjust itself by the choosen the LAF

So if it works for background coloring of a form, why does’nt it work for line-borders.
that’s my question.

Hope I am clear.

– In other words, clicking on the Default button does NOT change the default color of the LAF, you would have to edit the LAF itself directly, I believe, to make that change. (But someone correct me if I’m wrong!)

Exactly, it does not change the color, but it MUST obey the color of the LAF. and THAT is not working, because it is always black than!

Try it with the background coloring of a form. THERE it is working the right-way! If you set that to default, the form obeys the background coloring of the LAF

Exactly, it does not change the color, but it MUST obey the color of the LAF. and THAT is not working, because it is always black than!

Not challenging you with this question: truly asking. How does one know what the default color for a line border is in each LAF? When I saw the results I was getting I just figured, “all the LAFs that are installed use Black as the default color for a line.”

Well, maybe someone else can pitch in here & clear up the mystery…

kazar