Page 1 of 2

Rendering of a rounded field

PostPosted: Thu Feb 02, 2017 6:45 pm
by huber
I have a rounded field as shown in the attachement "rounded field". Unfortunately, the rendering is like for a rectangular field, i. e. the corners are not transparent as shown. Is there a way to set properties to achieve this? I tried but various combinations but did not achieve the desired result (rounded white field).

Best regards,

Re: Rendering of a rounded field

PostPosted: Mon Feb 06, 2017 12:57 pm
by jcompagner
are you talking here how it is shown in the developer? (in the client it is fine?, which client then?)

Re: Rendering of a rounded field

PostPosted: Mon Feb 06, 2017 2:42 pm
by huber
Hi Johan

I am talking about the correct rendering in the Smart Client. The example shown is a Smart Client, where it's not correctly rendered. It's better visible if you use a red background for example. It's also not correctly rendered in Developer.

jcompagner wrote:are you talking here how it is shown in the developer? (in the client it is fine?, which client then?)


Regards,

Re: Rendering of a rounded field

PostPosted: Mon Feb 06, 2017 4:06 pm
by jcompagner
ah see it, the only way i can see how it could work is make the background transparent

Re: Rendering of a rounded field

PostPosted: Mon Feb 06, 2017 4:35 pm
by huber
Making the background (of the field) transparent leaves only the border. But what I expect is a rounded white field (as is a normal rectangular field) on a grey background (for example). That means, if the background of a field with rounded corners is not taking into account the rounding radius for the background color, it's somewhat useless. At least I don't see an application case.

Could that be enhanced so that the radius of the field is taken into account for the background color?

jcompagner wrote:ah see it, the only way i can see how it could work is make the background transparent

Re: Rendering of a rounded field

PostPosted: Tue Feb 07, 2017 1:06 am
by Bernd.N
Try to put a rounded rectangle first on the form.
Then set the field with same background color or transparent, and without a border, on top of that.
Should work fine.
rectangle.png
Example
rectangle.png (1.47 KiB) Viewed 12535 times

Re: Rendering of a rounded field

PostPosted: Tue Feb 07, 2017 12:23 pm
by huber
Do you mean to put as a workaround a rounded image behind the rounded Servoy field? That of course would work. But it's really only just a workaround (which I don't like, because after a while they are all over various places which is not manageable). I expect Servoy to fix that (as well as the rendering of the editable combobox on macOS).
Servoy is a professional tool which allows for beautiful applications, isn't it ;-?

Servoy 7.4.4
OS X 10.11, macOS 10.12

Bernd.N wrote:Try to put a rounded rectangle first on the form.
Then set the field with same background color or transparent, and without a border, on top of that.
Should work fine.
rectangle.png

Re: Rendering of a rounded field

PostPosted: Tue Feb 07, 2017 12:44 pm
by Bernd.N
Could be that it is hard or even not possible to fix, with that you have a workaround that does not take much effort.

Re: Rendering of a rounded field

PostPosted: Tue Feb 07, 2017 12:51 pm
by patrick
I think all of the Mac's components basically have a label behind them that is troublesome (you also see that on comboboxes). Don't think there is anything Servoy can do about that.

Re: Rendering of a rounded field

PostPosted: Tue Feb 07, 2017 1:35 pm
by huber
If one would use an image, and the field should be resizable, it takes 3 images to have a workaround. The left part (something like half circle, depending on the chosen radius, the middle part (resizable), and the right part). Any change in the radius of the field would require new left/right parts.

I do regard these sort of creating layouts really as a thing of the past.

Bernd.N wrote:Could be that it is hard or even not possible to fix, with that you have a workaround that does not take much effort.


Regards,

Re: Rendering of a rounded field

PostPosted: Tue Feb 07, 2017 1:59 pm
by patrick
You could simply use two labels with rounded borders and put the field in the middle (with border top and bottom only) and above these labels. Then you can anchor your field to stretch and anchor the right label to top/right. No resizing issues. And again, I don't think this is a workaround for a Servoy feature, but a workaround for the Mac Look and Feel. On Windows, you don't have to do this afaik.

Re: Rendering of a rounded field

PostPosted: Tue Feb 07, 2017 3:54 pm
by Bernd.N
Why would the rounded rectangle that I suggested not work? That is just one additional component.

Re: Rendering of a rounded field

PostPosted: Tue Feb 07, 2017 3:57 pm
by huber
It's the same on Windows

patrick wrote:You could simply use two labels with rounded borders and put the field in the middle (with border top and bottom only) and above these labels. Then you can anchor your field to stretch and anchor the right label to top/right. No resizing issues. And again, I don't think this is a workaround for a Servoy feature, but a workaround for the Mac Look and Feel. On Windows, you don't have to do this afaik.

Re: Rendering of a rounded field

PostPosted: Tue Feb 07, 2017 4:25 pm
by huber
I have not insight into how difficult is to fix and I have understanding for the difficulties. I am only saying that as a user of the development tool, this should just not be the question I should have to think about. But I understand you (and may be Servoy) see it differently.

Bernd.N wrote:Could be that it is hard or even not possible to fix, with that you have a workaround that does not take much effort.

Re: Rendering of a rounded field

PostPosted: Tue Feb 07, 2017 4:27 pm
by huber
Hi Bernd

Your proposal works and I implemented it the way you suggested.

Bernd.N wrote:Why would the rounded rectangle that I suggested not work? That is just one additional component.


Thanks and regards,