Styles: rounded corners

Hi Guys,

What would be the best way to style a drop-down box (and pretty much any box with rounded corners) differently than the default Servoy combo?
I’ve got graphics and I was trying to put them all together with the help of a html_area element by creating a html table with relevant images set as backgrounds to table cells:

<html><head></head>
<body>
<table>
<tr>

<td>
<img src='file:///path/images/dialogDropDown_left.png'>
</td>

<td style="background-image:url('file:///path/images/dialogDropDown_middle-repeat-x.png')">
</td>

<td>
<img src='file:///path/images/dialogDropDown_right.png'>
</td>

</tr>
</table>
</body>
</html>

This html displays correctly in the browser and it stretches the image in the middle (because my drop-downs are all different widths, it can’t be fixed size).
But in Servoy it displays the image in its original width which is 1px (background-repeat doesn’t work due to java limitations).
Setting the element mediaOptions apparently does not produce the desired effect either.

How do I go about it? Perhaps, there is a better way to style my application?
Thanks for any clues!

Cheers,
Maria

Is this for Smart Client or Web Client? If its Web Client only, there is a little trick where you can actually put in standard CSS in your servoy CSS style (like you would in a normal website) and it will render in the web client. However it won’t work in the Smart Client since it only uses the Servoy specific styles listed in documentation.

goldcougar:
Is this for Smart Client or Web Client? If its Web Client only, there is a little trick where you can actually put in standard CSS in your servoy CSS style (like you would in a normal website) and it will render in the web client. However it won’t work in the Smart Client since it only uses the Servoy specific styles listed in documentation.

Hi Scott,
It’s the Smart Client.
So there’s no way to customize the look of comboboxes? :?

Short of using a specific Look & Feel or wrapping your own custom bean around a combo-box and overriding paint() (quite painful to do), I can’t think of an easy way.

Hi Maria,

maria:
So there’s no way to customize the look of comboboxes? :?

Sort of. You can use images to create the look and then use a plain label to show the selected value and a popupmenu (see window menu) triggered by the onAction event on this label to show the menu.
Little bit of work (framework it) but it works both in Smart and Web client.
Downside is you always have to use a mouse to select a new value.

Hope this helps.

ROCLASI:
Hi Maria,

maria:
So there’s no way to customize the look of comboboxes? :?

Sort of. You can use images to create the look and then use a plain label to show the selected value and a popupmenu (see window menu) triggered by the onAction event on this label to show the menu.
Little bit of work (framework it) but it works both in Smart and Web client.
Downside is you always have to use a mouse to select a new value.

Hope this helps.

Thanks Robert.
I might use this strategy. Otherwise our comboboxes just look out of place.

Cheers,
Maria