Themes

0
0

Hello,

Is it possible to use different themes for different instances of the same component?
I’ve created a theme to customize the look of the DataGridViewCheckBoxColumn. So far everything works properly. Clearly, this customization applies to all datagridview of my application.
But now I need to apply the ‘thema Blue-1’ to the DataGridViewCheckBoxColumn of only one specific datagridview, leaving the others unaltered.
It’s possible?
Thank you

  • You must to post comments
0
0

Sample updated (attached). It’s a lot easier now. In a future release we’ll add the AppearanceKey property to columns and cells.

 

  • You must to post comments
0
0

Hi Luca,

with current Wisej 1.4.25.0 this example isn’t working any longer.

Can you fix your example, please?

Regards,

Jens

  • You must to post comments
0
0

Hi Luca,

Thanks to your suggestion.

I’ve migrated my custom control of my VindowsForm application. In my new custom checkboxcolumn i changed the icons and other display styles. I just noticed a problem (even in your example). The edges of the cell are disappeared. I could not see them.Do you have any suggestions?
Thanks

  • You must to post comments
0
0

Now it works perfectly.

Thanks Luca.

  • You must to post comments
0
0

Forgot to add that with the upcoming build, overriding column/cell appearance will be much easier. I will update the example after the build is uploaded.

  • You must to post comments
0
0

The main issue is that you didn’t set the .js and .theme files as “Embedded Resources”.

The second issue that I just discovered and didn’t know is that VB.NET builds embedded resources differently – it ignores completely the path!

https://stackoverflow.com/questions/12860969/automatically-add-namespace-based-on-path-to-embedded-vb-net-resources

Wisej searches in Platform, Resources and Themes, but VB.NET doesn’t include the path in the namespace. So I fixed your code by simply adding the prefix “Platform.” to the .js file and “Themes.” to the mixin and now it works. Another way is to edit vbproj by hand (see link above).

We’ll have to document this somewhere.

  • You must to post comments
0
0

Sorry I forgot the attachment

  • You must to post comments
0
0

Hi Luca,
I’ve studied your example and I think I understand the methodology.
I tried translating it into VB on a new project, but the mycheckboxcolumn column1 on dtatgridview displays only False. I do not know where I’m wrong.
I attach your translated example.

Thanks

  • You must to post comments
1
0

It’s possible for all Wisej controls. For most it’s as easy as setting the appearance key. You don’t have to create a new theme, you can use a theme mixin to add or modify whatever theme is loaded.

However for some complex controls it’s a bit more difficult since they have child elements that are also styled but are not actual controls. DGV columns and cells are the most complex. We have a system of cell renderers that can be overridden to do just about anything, but it’s not simple. We are simplifying it as requirements come our way from projects.

I have attached a small sample that creates a custom renderer overriding the checkbox cell and includes a mixin theme to make the checkbox red. You can change any aspect you like in the mixin or the renderer. To see the full wisej javascript source code you can download the wisej.js from from the browser, when in debug mode it’s not minified.

Overriding the cell renderer is one of those things being simplified…

 

  • You must to post comments
Showing 9 results
Your Answer

Please first to submit.