Rendering of a rounded field

Questions and answers for designing and implementing forms in Servoy

Rendering of a rounded field

Postby huber » Thu Feb 02, 2017 6:45 pm

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,
Attachments
rounded field rendering.png
The field properties
rounded field rendering.png (7.5 KiB) Viewed 2095 times
rounded field.png
Corners outside the rounded fields are also white instead of the grey background color
rounded field.png (57.14 KiB) Viewed 2095 times
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 266
Joined: Mon May 14, 2012 11:31 pm

Re: Rendering of a rounded field

Postby jcompagner » Mon Feb 06, 2017 12:57 pm

are you talking here how it is shown in the developer? (in the client it is fine?, which client then?)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8008
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Rendering of a rounded field

Postby huber » Mon Feb 06, 2017 2:42 pm

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,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 266
Joined: Mon May 14, 2012 11:31 pm

Re: Rendering of a rounded field

Postby jcompagner » Mon Feb 06, 2017 4:06 pm

ah see it, the only way i can see how it could work is make the background transparent
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8008
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Rendering of a rounded field

Postby huber » Mon Feb 06, 2017 4:35 pm

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
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 266
Joined: Mon May 14, 2012 11:31 pm

Re: Rendering of a rounded field

Postby Bernd.N » Tue Feb 07, 2017 1:06 am

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 1914 times
Bernd Korthaus
LinkedIn
Servoy 7.4.9 SC postgreSQL 9.4.11 Windows 10 Pro
User avatar
Bernd.N
 
Posts: 480
Joined: Mon Oct 21, 2013 5:57 pm
Location: Langenhorn, North Friesland, Germany

Re: Rendering of a rounded field

Postby huber » Tue Feb 07, 2017 12:23 pm

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
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 266
Joined: Mon May 14, 2012 11:31 pm

Re: Rendering of a rounded field

Postby Bernd.N » Tue Feb 07, 2017 12:44 pm

Could be that it is hard or even not possible to fix, with that you have a workaround that does not take much effort.
Bernd Korthaus
LinkedIn
Servoy 7.4.9 SC postgreSQL 9.4.11 Windows 10 Pro
User avatar
Bernd.N
 
Posts: 480
Joined: Mon Oct 21, 2013 5:57 pm
Location: Langenhorn, North Friesland, Germany

Re: Rendering of a rounded field

Postby patrick » Tue Feb 07, 2017 12:51 pm

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.
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3622
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Rendering of a rounded field

Postby huber » Tue Feb 07, 2017 1:35 pm

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,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 266
Joined: Mon May 14, 2012 11:31 pm

Re: Rendering of a rounded field

Postby patrick » Tue Feb 07, 2017 1:59 pm

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.
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3622
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Rendering of a rounded field

Postby Bernd.N » Tue Feb 07, 2017 3:54 pm

Why would the rounded rectangle that I suggested not work? That is just one additional component.
Bernd Korthaus
LinkedIn
Servoy 7.4.9 SC postgreSQL 9.4.11 Windows 10 Pro
User avatar
Bernd.N
 
Posts: 480
Joined: Mon Oct 21, 2013 5:57 pm
Location: Langenhorn, North Friesland, Germany

Re: Rendering of a rounded field

Postby huber » Tue Feb 07, 2017 3:57 pm

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.
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 266
Joined: Mon May 14, 2012 11:31 pm

Re: Rendering of a rounded field

Postby huber » Tue Feb 07, 2017 4:25 pm

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.
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 266
Joined: Mon May 14, 2012 11:31 pm

Re: Rendering of a rounded field

Postby huber » Tue Feb 07, 2017 4:27 pm

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,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 266
Joined: Mon May 14, 2012 11:31 pm

Next

Return to Forms

Who is online

Users browsing this forum: No registered users and 3 guests

cron