Using tinyLAF with themes

Hi,

I’ve found the tinyLAF tool to create my own look and feel.
Within this tinyLAF you can make themes, so I want to create my own theme.

When I look in the manual (DevUserGuide 3.5 Chapter 9.3 Skins) there is described how to add a Skin to servoy. Unfortunately the theme file is not a zip file like described in the manual.

Anyone knows how to use this theme file in Servoy?
Renaming the .theme to .zip doesn’t work, so I guess there must be another solution.

Martin

What is the extension of the theme file?

If I am correct you should be able to use .jar and .zip.

However, not all themes will give you a (nice) result…

the extension is .theme

ok, you downloaded the file and it was unzipped immedialely.

You can repack the distribution zip folder tinylaf-1_3_8.zip and it should work.

There are more themes available in the pack…

I used Media → Import and selected the .zip file, but this gives an error:

java.lang.NullPointerException

I’ve put the zip file in the lafs directory → Can’t select the LAF

I’ve extracted the zip file in the lafs directory → I can select Tiny and I can select the Default theme, but not the other themes. Where is the default theme and how can I change it? Having Default.theme in the lafs directory is not enough. It doesn’t take this one.

I really can’t give you all those answers. Maybe there is stuff in there that just doesn’t work…

Do you know another tool that I can use to create my own look and feel and that works within Servoy?

To be honest I don’t like lafs so the answer is no.

When I searched google with ‘java create laf’ it gave me a lot of hits.
Looks like there are some alternatives…

I can only tell you that creating your own LAF is a really complicated story, so I’d forget about that.

When I searched google with ‘java create laf’ it gave me a lot of hits.
Looks like there are some alternatives…

None of them is what I’m really looking for / or doesn’t even start.
And I don’t need a tool which needs any knowledge of Java.
I need a tool (like TinyLAF) where I can save the default look & feel of the different type of elements, since Servoy can’t do that for me. Example:

  • I want to change the color of the arrow in my combobox
  • The fore/background color of my columnheaders in tableview
  • The look & feel of the tabpanel tabs
  • The color of the window header
  • The color of a disabled combobox

As far as I found out, I can’t change these with the CSS and I need a LAF for that. But all tools (except the TinyLAF), don’t offer me what I want.

So I need the (default) theme file of TinyLAF to be used in Servoy or there must be a similar tool like TineLAF where I can define the LAF of all type of elemets (combobox, tabpanel, checkbox, radios, etc) and (enabled/disabled).

So it would be great if someone knows how to use themes from TinyLAF or an alternative tool with same possibilties.

See the attachment with a screenshot of TinyLAF.

Hi Martin,

If you don’t want to code any Java then there is only one solution left I believe.
Use images and handle the rest yourself (popupmenu plugin, etc.).

The theme files of TinyLNF need to be stored in a specific directory on the client machine.

Which dir that , I forgot, but Martin, I think I allready figured this out for you once…

Do note that when using specific LNF’s, that user can switch LNF themselves (which you might be able to prevent by hiding the preferences menu in the smart client using it2be’s menuplugin, but then you also loose access to all other preferences).

As far as I’m aware, TinyLNF is the only Laf that allows you to create your own theme. The only other option is diving into Java to create a laf and like patrick says: that’s a lot of work, even if you know java.

Paul

Martin, you can create your own theme, save it as Default.theme and then you have to put it in the classpath root.

To do this, you can put the Default.theme file in the root of tinylaf.jar and then store the jar in the lafs folder. This has worked for me.

Hi Paul,

Thanks for your reply. Now I know that there are no other tools to make a Look & Feel, I’ll try to find another solution.
I thought there would be more tools like TinyLAF, but looking at your reply, and from other, that is probably not the case.

Which dir that , I forgot, but Martin, I think I allready figured this out for you once…

Yes we have tried, but it didn’t work 100% correct. The readme file of TineLAF, says something about using TinyLAF & Javawebstart, but that seems difficult to me when using Servoy. There must be a certain setting in the .jnlp file.

The correct location for this theme file is C:\Documents and Settings<username>

So what are the other options to realize the following:

  • I want to change the color of the arrow in my combobox
  • The fore/background color of my columnheaders in tableview
  • The look & feel of the tabpanel tabs
  • The color of the window header
  • The color of a disabled combobox

What is possible to do with CSS and what is certainly not possible?

Martin, you can create your own theme, save it as Default.theme and then you have to put it in the classpath root.

To do this, you can put the Default.theme file in the root of tinylaf.jar and then store the jar in the lafs folder. This has worked for me.

That works perfect. This is indeed what I wanted.
Thank you very much!

Martin