Email Client

Does this look nice? :D

Very very nice!

Please tell us more.

It’s just a emailclient completely build in Servoy. And guess what: it works too! :D

The three main-components are:

  • the mail-plugin
  • the JsplitPanel bean
  • and the dbtreeview bean.

and a lot of trying-erroring-editing-and retrying! :lol:

Looks very cool, Harjo!

Paul

Anyone knows how to set the node images ?
And can you set different images for each node?

Also it seems that the dbtree bean only works with Servoy 2.1.1.

ROCLASI:
Anyone knows how to set the node images ?
And can you set different images for each node?

Also it seems that the dbtree bean only works with Servoy 2.1.1.

Yes, that is what I want to know too!
Jan B? can you help us out?

Nice looking app! , the node image can be set by binding the imagedataprovider, like:
treeview.bindNodeImageMediaDataProvider(‘icon_column’);// icon_column is of type media (database blob)
or
treeview.bindNodeImageURLDataProvider(‘icon_column’);// icon_column is of type urls ,like http://www.cnn.com/images/xxxx.gif

Note the image is at best when 16x16 px.

This is very cool.
But I have something weird going on.
I have 5 nodes each with a custom icon (from a related table).

When I initialise the tree I see that my icons are shifted 1 position.
So its icon 5,1,2,3,4.

Then when I expand/collapse a row the first row takes the icon of that row (the correct icon for that row I might add).

Sounds like a bug.

Servoy 2.1.1b1-build 311
Java version 1.4.2-38
Mac OS X 10.3.5

I tried to get the icons from teh Media library, by adding this to the refreshTreeView method:

elements.dbtreeview.bindNodeImageURLDataProvider('media:///printer.gif');

but the Icons on the tree are now changed… Where am I going wrong?

Paul

bindNodeImageURLDataProvider() needs a columnname of your table that you are using for your tree.
This can be a related field as well.
The URL needs to be in that field.

bindNodeImageURLDataProvider() needs a columnname of your table that you are using for your tree.
This can be a related field as well.
The URL needs to be in that field.

From what description Jan gave us, it looks to me that it has to be a URL and not a column. The other method seems to has to be used when you want tyo take the Icon from a column in a table.

As in other places (for example in HTML area’s) the ‘media:///printer.gif’ get’s the image from the media library, whereas if you would do the example Jan gave us (http://www.cnn.com/images/xxxx.gif ) would get an Image from a website.

So, I think the question still stand why it doesn’t work. Am I attaching the code in the right method?

Paul

YOu are passing a media url, that NOT correct, you have to pass a column dataprovider name!

Hmm…2 posts..not sure what happend. Sorry about that.

Jan, any idea on the shifted icon issue?
Also is it possible to expand/collapse certain nodes through code?
If not consider this a feature request. :D

OK, I’ve stored the URL in a column and it works now, tnx for the explanation.

I did it by adding a column to the book_nodes table, called “url”.

Then I put in some of the url fileds the following test: “media:\\printer.gif”,
expecting to get the printer icon on the records where I added the text to the url column, when i also added the following code to the refreshTreeView method:

elements.dbtreeview.bindNodeImageURLDataProvider('url');

At first I thought it worked fine, but when opening, closing nodes on the tree, I saw the Icons shifting place.

I guess this is somewhat related to what Roclasi sees.

Can we prevent this, or can the logic be altered so the set icons stick?

Paul

Is there a way to turn the ScrollBars off on the DBTreeBean? Because now you get double ScrollBars: both the bean starts to show scrollbars and the form starts to show them, if you move the splitpane to the left and not the entire text can be shown.

Paul

Make the bean small and use anchors to grow to all sides!

HJK:
Make the bean small and use anchors to grow to all sides

When you use the dbtree view in a splitpane the bean already grows with it.
As for the scrollbar, this reacts on the data inside the tree, not the bean width/height itself.

So having an option to enable/disable this like other fields have would be a plus.
Not sure why you would want that though…

Paul?

ROCLASI:
Also is it possible to expand/collapse certain nodes through code?
If not consider this a feature request. :smiley:

Yes, is this possible? for instance a default selection?

When using the Tree bean in a splitpane, making the splitpane smaller than the size of the bean on the form where it’s placed would result in the showing of two scrollbars on the bottom, which I do not prefer.

Fixed this now by making the bean element very small (5 by 5 pixels). Now I get only 1 scrollbar on the bottom (the SplitPane scrollbar), so I guess there’s a workaround for this.

While trying this, I noticed that its not possible to update the size or the location of the Bean element on a form through the property editor. should that work?

Paul