martinh
September 15, 2011, 8:28am
1
What happened to the setTabBGColorAt() method on tabpanel.
I had coding like this:
if (remarks)
elements.tabs_70.setTabBGColorAt(3, '#FFFF99')
else
elements.tabs_70.setTabBGColorAt(3, 'DEFAULT')
So that an user could see that on the (not selected) tabpanel with remarks, that there are remarks
[attachment=1]Capture.JPG[/attachment]
But this only still seem to work in development (5.2.10) and not in runtime environment
I also see that this method is not visible anymore in development tree:
[attachment=0]Capture2.JPG[/attachment]
I want to have the same functionality again, like it worked before. How can I do this?
that bg color setting of tabs don’t work for many look and feels
so it is made deprecated. That you still do it and it works maybe in developer but not in runtime is exactly the reason for this removal
tgs
September 16, 2011, 9:17am
3
Hi Martin,
what I’m doing is to set a different fgcolor for active/inactive tabs:
elements.tabs_60.setTabFGColorAt(3, '#000000');
elements.tabs_60.setTabFGColorAt(2, '#AAAAAA');
elements.tabs_60.setTabFGColorAt(1, '#AAAAAA');
In Servoy 5.x I also formatted the text of the tabs to bold/plain if tab is active or not by
elements.tabs_60.setFont('Tahoma,1,11');
but this occurs a warning in Servoy 6.
martinh
September 16, 2011, 9:19am
4
I replaced my coding by this:
var _label = i18n.getI18NMessage('globis.label.remarks')
if (remarks)
elements.tabs_70.setTabTextAt(3, '<html><div style="background-color: #ffff99">' + _label + '</div></html>')
else
elements.tabs_70.setTabTextAt(3, _label)
But as you can see it is not a nice as the original one (now there is more white space)
[attachment=0]Capture.JPG[/attachment]
Is there some other HTML coding that fills also the white space with the required color?
martinh
September 16, 2011, 9:45am
5
Strange … this doesn’t work in webclient
The complete tabpanel is invisible.
Maybe that specific html is not parsed and escaped correctly in the webclient, please make a case
martinh
September 20, 2011, 10:24am
7
Case #418245 added with sample solution.
The problem only occurs in 5.2
In 6.0 the tabpanel remains visible, but I can’t say that the result is very nice.