Table view header height in Windows 7/8

Questions and answers for designing and implementing forms in Servoy

Table view header height in Windows 7/8

Postby huber » Mon Jun 16, 2014 12:06 pm

Hi All

In Windows 7/8 the height of the table headers is quite big, see attached screenshot. As it is automatically generated by Servoy, as a developer I have no influence on it (I assume). Is this correct? Are there some implicit dependencies? There are also a 2px between the header an the first line (white in my screenshot). This does not look very good. Is there a way to make it better? It's a Smart Client solution.

Servoy 7.3
Windows 7/8
Java 7

Regards,
Attachments
table view header windows.png
table view header windows.png (20.3 KiB) Viewed 11469 times
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 518
Joined: Mon May 14, 2012 11:31 pm

Re: Table view header height in Windows 7/8

Postby mboegem » Tue Jun 17, 2014 12:50 am

huber wrote:As it is automatically generated by Servoy, as a developer I have no influence on it (I assume). Is this correct?


This is not correct.
Along the way in one of the 3.5 versions (if I'm not mistaken) Servoy introduced the 'labelFor' property.
Using this property (on a label type element of course) you can bind it to another element, for example a field.

Only thing here is that you'll need to have named elements in order to bind the label to another element.
In a tableview the label with labelFor property will replace the default OS header.

As this all can be quite some work in existing solutions, you might want to add the labels using the solutionModel on startup.
Big advantage here is that you can re-style, take the labels off simply by altering the method that adds all these labels.

Anyway, here some more background info where you also participated a long time ago ;-)
https://www.servoy.com/forum/viewtopic.php?f=2&t=15528
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1752
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Table view header height in Windows 7/8

Postby huber » Tue Jun 17, 2014 8:17 am

Hi Marc

Thanks for your explanation. Mentioning Servoy version 3.5 gives me a feeling how long of a way we have come :-)
What I meant was if there is any way to influence the generation of the header other than the LabelFor way. To me the LabelFor is very odd and a reminiscence of the past and in strong contrast to the styling with CSS. I am waiting for the day the header properties will be settable by the Style Sheet Hopefully not to far away :-) On the other hand, the post you reference is more than three years old :-o

Regards,

mboegem wrote:
huber wrote:As it is automatically generated by Servoy, as a developer I have no influence on it (I assume). Is this correct?


This is not correct.
Along the way in one of the 3.5 versions (if I'm not mistaken) Servoy introduced the 'labelFor' property.
Using this property (on a label type element of course) you can bind it to another element, for example a field.

Only thing here is that you'll need to have named elements in order to bind the label to another element.
In a tableview the label with labelFor property will replace the default OS header.

As this all can be quite some work in existing solutions, you might want to add the labels using the solutionModel on startup.
Big advantage here is that you can re-style, take the labels off simply by altering the method that adds all these labels.

Anyway, here some more background info where you also participated a long time ago ;-)
https://www.servoy.com/forum/viewtopic.php?f=2&t=15528
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 518
Joined: Mon May 14, 2012 11:31 pm

Re: Table view header height in Windows 7/8

Postby Harjo » Tue Jun 17, 2014 9:11 am

huber wrote:To me the LabelFor is very odd and a reminiscence of the past and in strong contrast to the styling with CSS.


The styling is totally up to you!
Look at this example (Smart-Client, using image gradients) which gives the exact same look on Windows & Mac.

2014-06-17_0907.png
2014-06-17_0907.png (25.28 KiB) Viewed 11412 times


I do not set a LabelFor in development for every field a table-view, but use the technique Marc pointed out, by using SolutionModel (one method at startup)
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Table view header height in Windows 7/8

Postby mboegem » Tue Jun 17, 2014 10:32 am

huber wrote:What I meant was if there is any way to influence the generation of the header other than the LabelFor way. To me the LabelFor is very odd and a reminiscence of the past and in strong contrast to the styling with CSS. I am waiting for the day the header properties will be settable by the Style Sheet Hopefully not to far away


By default the java client is using the default OS headers.
There are 2 options to style the headers:
1) use LaF, but that's probably going to have influence on all the other elements of your solution
2) use what I described, then you replace the default OS headers by a label and you have full control over the styling.

Using the 2nd and with a good piece of code you should be able to crack the problem within your solution in half a day. For an unlimited number of existing tableviews.
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1752
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Table view header height in Windows 7/8

Postby mboegem » Tue Jun 17, 2014 10:34 am

Harjo wrote:I do not set a LabelFor in development for every field a table-view, but use the technique Marc pointed out, by using SolutionModel (one method at startup)


You still need to set the LabelFor property though, using the solutionModel.
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1752
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Table view header height in Windows 7/8

Postby Harjo » Tue Jun 17, 2014 10:41 am

mboegem wrote:You still need to set the LabelFor property though, using the solutionModel.


Yes, but not doing it manually in developer, but by doing it via solutionModel.
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Table view header height in Windows 7/8

Postby huber » Tue Jun 17, 2014 11:28 am

Thanks for pointing to a (the) solution. Actually, my question contained two parts, one about (a) possible solution(s), and one about concepts used by Servoy. As far as I understood so far, Servoy is going the CSS route - throughout the whole application development. To me a good and sensible way. One that also keeps the code to a minimum. Thats very good, as any code needs maintenance - sooner or later. Be it for whatever reason. And at that point the expense starts …
But that's a discussion for Servoy cafe, I think ;-)

Harjo wrote:
mboegem wrote:You still need to set the LabelFor property though, using the solutionModel.


Yes, but not doing it manually in developer, but by doing it via solutionModel.
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 518
Joined: Mon May 14, 2012 11:31 pm

Re: Table view header height in Windows 7/8

Postby david » Tue Jun 17, 2014 3:07 pm

huber wrote: and one about concepts used by Servoy. As far as I understood so far, Servoy is going the CSS route - throughout the whole application development. To me a good and sensible way. One that also keeps the code to a minimum. Thats very good, as any code needs maintenance - sooner or later. Be it for whatever reason. And at that point the expense starts ….


More correctly, Servoy is going (new) web client route throughout the whole application development. Maybe smart client comes back in the future based completely on JavaFX if Oracles pulls that project off. But smart client as we know it is end-of-life. I wouldn't expect too many improvements to be made in this area.
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Table view header height in Windows 7/8

Postby huber » Tue Jun 17, 2014 3:20 pm

Hi David

I know your are not that a big fan of the Smart Client ;-) And we were there at ServoyCamp to hear about the new Web Client route.
Is the end-of-life statement an official statement given by Servoy? We rely on the Smart Client and I did not hear such a statement till today. But I very well may have missed it.

david wrote:More correctly, Servoy is going (new) web client route throughout the whole application development. Maybe smart client comes back in the future based completely on JavaFX if Oracles pulls that project off. But smart client as we know it is end-of-life. I wouldn't expect too many improvements to be made in this area.
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 518
Joined: Mon May 14, 2012 11:31 pm

Re: Table view header height in Windows 7/8

Postby david » Tue Jun 17, 2014 3:36 pm

Just reading the tea leaves. Oracle's stance: http://www.oracle.com/technetwork/java/ ... 554.html#6. Then there is the whole deluge of coding advances going on around the browser client. And of course Apple hasn't been all that friendly to Java clients for a long time now.

Prediction: once the new web client hits, there won't be anyone on this forum talking about smart client.
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Table view header height in Windows 7/8

Postby david » Tue Jun 17, 2014 3:40 pm

huber wrote:I know your are not that a big fan of the Smart Client ;-)


Actually, a big fan of smart client—it's just that we had too many clients on macs. So with Servoy 6.1 we gave the current web client a try. Definitely not fans of web client.
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Table view header height in Windows 7/8

Postby Harjo » Tue Jun 17, 2014 3:45 pm

:D

There are thousands of customers relying every day on smart-client.. so end-of-life? No that will take a while before Servoy will/can do that...
Also now with the (latest) Oracle Java for OSX, the smart-client is a WHOLE lot better.

That Servoy is targeting web, and there will be not much improvement for smart-client, I fully agree...
But hey... who knows.... Technology is going fast these days....
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Table view header height in Windows 7/8

Postby david » Tue Jun 17, 2014 3:59 pm

Harjo wrote:There are thousands of customers relying every day on smart-client.. so end-of-life? No that will take a while before Servoy will/can do that...


Still being around and end-of-life two different things—there are still a ton of green screens being used for example :)
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Table view header height in Windows 7/8

Postby huber » Wed Jun 18, 2014 3:16 pm

I am wondering what is a whole lot better? We did not notice differences in Smart Client because of Oracle Java. Visual problems like not correct rendering of Combobox (editable), background of radio buttons not transparent when Transparency is set, text area fields not acting according to field style in Style Sheet seem all not related to Java. Except you tell me otherwise…

Harjo wrote::D

There are thousands of customers relying every day on smart-client.. so end-of-life? No that will take a while before Servoy will/can do that...
Also now with the (latest) Oracle Java for OSX, the smart-client is a WHOLE lot better.

That Servoy is targeting web, and there will be not much improvement for smart-client, I fully agree...
But hey... who knows.... Technology is going fast these days....
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 518
Joined: Mon May 14, 2012 11:31 pm


Return to Forms

Who is online

Users browsing this forum: No registered users and 21 guests

cron