dbTreeView - text color, Mac selection bar, indentation

Hi All

The dbTreeView bean is getting better and better, nice to see!

But ( as usual .-) some functionality I am not able to do currently but would like to :-)

I would like to apply a blue selection bar as (for example) in iTunes (selection in left pane) or in the Mac Mail client, where also the text colour gets white. I am able to do this in a ordinary list view with HTML, but can it be somehow done for the dbTreeView? Where does the default colour come from? Defined in LAF?

Can I control the font size?

I also would like to control the indentation and the row height of the bean?

Is there somewhere a list of all current methods for this bean?

BTW, what is the latest function addition setExpandedNode for?

Thanks for help!

Best regards, Robert

With setExpandedNode, you can expand nodes through scripting.

A list of all method of the BDTreeView bean: Just add it to a form and have a look in the Method Editor?!?

As for the other things: You can create a feature request in the support system.

Paul

HI

Coming back to my request of controlling the indentation of a row in the DBTreeView and DBTreeTableView beans. As seen in the attached image, I would like to move the menus (Klassen, Klassenkurse, Kurse, …) to the left, like where the red line is.
I also would like to move EINTEILUNGEN closer to the triangle, but that is the same controlling as the others.

Has anyone found a solution for this? Otherwise I make a request.

Regards,

you can’t control the indention more the the left.

but you can control a bit, the row selection color, with HTML, like this
[attachment=0]Schermafbeelding 2012-03-01 om 13.17.39.png[/attachment]

by doing some html: ```

’ + i18n.getI18NMessage(‘i18n:1.emailout’) + ‘’ + counting + ‘


the background color is controlled by:

var vForegroundcolor = new Packages.javax.swing.plaf.ColorUIResource(Packages.java.awt.Color.decode(‘#ffffff’));
var vBackgroundcolor = new Packages.javax.swing.plaf.ColorUIResource(Packages.java.awt.Color.decode(‘#8492a5’));
var uiDefaults = Packages.javax.swing.UIManager.getDefaults();
uiDefaults.put(“Tree.selectionBackground”, vBackgroundcolor);
uiDefaults.put(“Tree.selectionForeground”, vForegroundcolor);


![Schermafbeelding 2012-03-01 om 13.17.39.png|267x144](upload://mKrG8H2vaJPwFDVBBYY6YxBK3kz.png)

Hi Harjo

Thanks for the hint, did it. It also helps as the clickable area is now much wider, especially good for short menu names! Now, if we only could have it spread over the whole with, then it would really also look good :-)
I control foreground and background with a HTML paragraph style, but your idea with Java seems also very nice.

if (id == globals.selectedMenuId) {
		nodeName = '<html><table width = "92px" border="0"><tr><td><p style = "font-size: 11; color: #ffffff; font-weight: regular">' + i18n.getI18NMessage(name) + '</p></td></tr></table></html>'; // Display font in white
		}
	else {
		nodeName = '<html><table width = "92px" border="0"><tr><td><p style = "font-size: 11; color: #263c53; font-weight: regular">' + i18n.getI18NMessage(name) + '</p></td></tr></table></html>';  // Display font in standard color for menu

Regards,

Maybe you have to look at the sourcelist Bean here: http://www.servoy-plugins.de/beans/tabl … -bean.html

that one look exactly like iTunes, on Windows AND MAc

the drawback is that it is Smart Client only!

Hi Harjo

SmartClient only is no option for us, as we are putting some effort to have our apps also work in the browser.
I forgot to mention in my last post: I have the effect, that if I make the table witdh > than a certain value (in my example > 92px), the bean gets a horizontal slider, which of course in this context is really not wanted. Up to a certain value, the slider does not appear, above it does!?
It seems to me the value of the pixels is the max. empty space remaing from the shortest menu text, but I am not sure. It certainly is not the width of the whole background rectangle of the menu.

Harjo:
Maybe you have to look at the sourcelist Bean here: http://www.servoy-plugins.de/beans/tabl … -bean.html

that one look exactly like iTunes, on Windows AND MAc

the drawback is that it is Smart Client only!

Regards,

Hi Robert,

You could always go the SolutionModel route. This way you have full control and it’s 100% native to Servoy and therefor will work in both web and smart client.
Here is an example of a tree made with the solution model:

[attachment=0]SolutionModelTree.png[/attachment]

Hi Robert

Thanks for the hint, didn’t think of this possibility, although, we like to use beans as predefined components, that’s what they are for, aren’t they?

Regards,

ROCLASI:
Hi Robert,

You could always go the SolutionModel route. This way you have full control and it’s 100% native to Servoy and therefor will work in both web and smart client.
Here is an example of a tree made with the solution model:

[attachment=0]SolutionModelTree.png[/attachment]