Looking at the documentation, I could not find an answer. How to display an image (existing in the Media Node of the Developer) in a column of the table from Servoy Extra Components?
Regards,
Looking at the documentation, I could not find an answer. How to display an image (existing in the Media Node of the Developer) in a column of the table from Servoy Extra Components?
Regards,
Robert
The use of a data provider for the column and display as html might be useful:
vf_image_test = '<html><img src=\"media:///money.png\" width="24" height="24"></html>';
See the attached screen capture. Of course you can modify to get image from a database table and via a calculation result in the html string.
I am sure others will chime in with different ideas.
Tom
Hi Tom
Again, thank you, works as you describe
Best regards,
Hi Robert,
performance-wise I can recommend using font-awesome icons.
Anything CSS-based… Just display a div with a class name the HTML data-type set in the column.
Style the class in your CSS. You can use Font-Awesome which will be very fast as Marc says, or your own images specified in the CSS.
Thanks both of you for the hints and the detailing. We use custom designed icons. These are professional made icons adapted for the corresponding menu. The font awesome library has not such specific icons.
Christian, if you say … images specified in the CSS. To be able to get the image as a data provider, I have
… my images in the Media node and have scope variables defined like in following example
/**
* @type {String}
*
* @properties={typeid:35,uuid:"50D032E0-66E0-497C-B6F2-420ED6B51A5B"}
*/
var btnAddBlue = '<html><img src=\"media:///btnAddBlue.png\" width="30" height="36" style="margin:0px 0px 4px 0px"></html>';
This way I can access them bey NG-Grids and servoy extra table. Are there easier ways to do that?
Best regards,
huber:
We use custom designed icons. These are professional made icons adapted for the corresponding menu.
Maybe you can get those converted to a webfont?
If you want media images via css, you’ll find information here: viewtopic.php?f=69&t=21049
Marc
Image media via css work like a charm, much easier than what I tried. Thanks a lot for the hint. Also for the webfont. I have to read more about that.
Best regards,