Servoy / servoy-extra-components

NGClient component package of all kinds of 'extra' components
MIT License
6 stars 10 forks source link

treeview Awesome icon dataset format #64

Closed juanetec closed 4 years ago

juanetec commented 4 years ago

Hi, reading the treeview wiki it permit to put awesome font as a icon, but I could not find the exactly way to do it.

This is the way that I try to do: var treeviewDataSet = databaseManager.createEmptyDataSet( 0, ['id', 'pid', 'treeColumn', 'icon']); treeviewDataSet.addRow([1, null, 'Main group', 'fa fa-users']);

I put the awesome font like the wiki say but it gave me that error: WARN com.servoy.j2db.util.Debug - Invalid media value received: fad fa-cogs, cannot resolve it.

Please, what I am doing bad?

Un Saludo

Juan Ramírez

gboros commented 4 years ago

hi, you should use 'fa-icon' instead of 'icon' in the first row of the dataset

regards, Gabi

juanetec commented 4 years ago

Hi Gabi, I try to do what you are saying an it doesn't work. What I am doing wrong??

var treeviewDataSet = databaseManager.createEmptyDataSet( 0, ['id', 'pid', 'treeColumn', 'fa-icon']); treeviewDataSet.addRow([1, null, 'Main group', 'fa fa-users']); treeviewDataSet.addRow([2, null, 'Second group', 'fa fa-users']); treeviewDataSet.addRow([3, 2, 'Subgroup', 'fa fa-users']); treeviewDataSet.addRow([4, 3, 'Mark', 'fa fa-users']); treeviewDataSet.addRow([5, 3, 'George', 'fa fa-users']); elements.mytree.setDataSet(treeviewDataSet);

Un Saludo

Jua nRamírez

gboros commented 4 years ago

do you have the "Font Awesome" service added to the solution (from Servoy Package Manager)?

juanetec commented 4 years ago

Yes, of course.

gboros commented 4 years ago

then it should just work; can you drop a sample here to have a look?

juanetec commented 4 years ago

There is an example.

gboros commented 4 years ago

your sample code works fine for me, I did say to drop a sample so we are in the same context

gboros commented 4 years ago

ah, I just saw that the font awesome support is not in the latest released 3.0.0 version; until it will be released you can check/use it from source

juanetec commented 4 years ago

ok Thanks I will wait for it. I don't need it know.

Un Saludo

Juan Ramírez