Custom KryptonPalettes

Custom palettes created by the Krypton community.

Moderators: Phil Wright, Chris Porter

Re: Loading KryptonPalettes

Postby mike001 » Sat Aug 02, 2008 4:18 am

Hi,

Wonder whether somebody can help. I currently use the following code to load my palettes

a) In a module

Code: Select all
Public Manager As New ComponentFactory.Krypton.Toolkit.KryptonManager()


b) From each form I call it as follows:

Code: Select all
Try
            Manager.GlobalPaletteMode = System.Enum.Parse(GetType(ComponentFactory.Krypton.Toolkit.PaletteModeManager), strTheme, True)
        Catch ex As ArgumentException
        End Try
       


The 'strTheme' is a string value read from the database.

How does one go about it to do the same with a custom designed palette ?

Thanks
mike001
 
Posts: 11
Joined: Mon Jul 07, 2008 4:16 am

Re: Custom KryptonPalettes

Postby Phil Wright » Sun Aug 03, 2008 11:35 am

You need to assign a KryptonPalette instance to the KryptonManager.GlobalPalette
Phil Wright
Site Admin
 
Posts: 2720
Joined: Thu Apr 13, 2006 2:55 pm
Location: Melbourne, Australia

Re: Custom KryptonPalettes

Postby Waescher » Sun Aug 24, 2008 12:07 am

I found a few minutes to begin a new palette called "Diamond".
This is not finished yet - but here's a little preview pic.

Image

pre-order now! :wink:
Waescher
 
Posts: 219
Joined: Thu Jun 14, 2007 10:11 pm
Location: Germany

Re: Custom KryptonPalettes

Postby yannick » Tue Aug 26, 2008 4:01 pm

go make linuxStyles :p
yannick
 
Posts: 17
Joined: Fri Jul 25, 2008 6:43 am

Re: Custom KryptonPalettes

Postby biloxibeachboy » Sat Aug 30, 2008 6:48 pm

I've started a Purple Palette but could use some feed back on getting it working right. The file is located Here for download. The palette is looking OK but I want it to look great not OK so any feedback would be appriciated.

Image

I'm color blind so there may be a few issues with the color scheme as well.
Thanks,

Allen Brumley
Pegusus Software
biloxibeachboy
 
Posts: 41
Joined: Fri Jul 25, 2008 8:36 am
Location: Nashville, TN

Re: Custom KryptonPalettes

Postby biloxibeachboy » Sat Aug 30, 2008 6:55 pm

Waescher wrote:I found a few minutes to begin a new palette called "Diamond".
This is not finished yet - but here's a little preview pic.

pre-order now! :wink:


OK Now that is one that I would love to have!
Thanks,

Allen Brumley
Pegusus Software
biloxibeachboy
 
Posts: 41
Joined: Fri Jul 25, 2008 8:36 am
Location: Nashville, TN

Re: Custom KryptonPalettes

Postby biloxibeachboy » Fri Sep 05, 2008 7:27 am

Phil Wright wrote:You need to assign a KryptonPalette instance to the KryptonManager.GlobalPalette


New guy here. Could you please expand on this since I don't understand what you are saying?
Thanks,

Allen Brumley
Pegusus Software
biloxibeachboy
 
Posts: 41
Joined: Fri Jul 25, 2008 8:36 am
Location: Nashville, TN

Re: Custom KryptonPalettes

Postby Chris Porter » Fri Sep 05, 2008 7:46 am

biloxibeachboy wrote:
Phil Wright wrote:You need to assign a KryptonPalette instance to the KryptonManager.GlobalPalette


New guy here. Could you please expand on this since I don't understand what you are saying?


Drag a KryptonManager and a KryptonPalette onto your form. In the properties of the KryptonManager, set the GlobalPalette property to the name of the KryptonPalette. From that point, any settings you make in the KryptonPalette will be pushed to all Krypton based controls on your form.
Chris Porter
 
Posts: 714
Joined: Fri Oct 12, 2007 5:39 am
Location: Oklahoma City, OK, US

Re: Custom KryptonPalettes

Postby biloxibeachboy » Fri Sep 05, 2008 9:51 am

Chris Porter wrote:
biloxibeachboy wrote:
Phil Wright wrote:You need to assign a KryptonPalette instance to the KryptonManager.GlobalPalette


New guy here. Could you please expand on this since I don't understand what you are saying?


Drag a KryptonManager and a KryptonPalette onto your form. In the properties of the KryptonManager, set the GlobalPalette property to the name of the KryptonPalette. From that point, any settings you make in the KryptonPalette will be pushed to all Krypton based controls on your form.


OK now it makes sense. thanks for the post
Thanks,

Allen Brumley
Pegusus Software
biloxibeachboy
 
Posts: 41
Joined: Fri Jul 25, 2008 8:36 am
Location: Nashville, TN

Re: Custom KryptonPalettes

Postby Xplosiv » Sat Sep 13, 2008 9:52 am

Hi,

Has anybody done a theme that has the foolloeing colours:-

Main Colours - White, Black, Grey

Secondary Colours (Text etc):- Dark Red, red

I am only asking as it turns out i am rubbish at making themes

Thanks,

Xplosiv
Xplosiv
 
Posts: 126
Joined: Mon Jun 02, 2008 9:13 am

Re: Custom KryptonPalettes

Postby wachaz » Thu Sep 25, 2008 4:11 am

Hi Waescher,

I really like your Plastic theme, great work! I think I'll use it in my application in the future, is it ok?
Also I'd like to ask you the name of the Colors you've used in the theme - especially the default text color (the dark brown), and the light gray that is used in a lot of places ex. in the buttons (or if there is a way to query the colors), because I'd like to use the colors in other places, inside other components. Thanks in advance.
wachaz
 
Posts: 49
Joined: Mon Sep 08, 2008 7:52 pm

Re: Custom KryptonPalettes

Postby Waescher » Thu Sep 25, 2008 4:27 pm

Hi wachaz,

sure, just use it. I'm waiting for the day I start a program and it shows up with a palette of mine :mrgreen:

Just open the xml-File with a text editor or the PaletteDesigner to see what colors I'm using in this palette. If the color isn't set explicitly, the color of the BasePalette is used.

You can retrieve this color if you use the KryptonManager in your Code:
Code: Select all
KryptonManager.CurrentGlobalPalette.Get...Color()
Waescher
 
Posts: 219
Joined: Thu Jun 14, 2007 10:11 pm
Location: Germany

Re: Custom KryptonPalettes

Postby wachaz » Thu Sep 25, 2008 11:46 pm

Thanks for the help Waescher. If I finish my app (or at least the gui) I'll show you, what your theme can do ;)

By the way, anyone has an idea how use custom themes in designer mode too? I import the xml at runtime, but it'd be nice to see it in action when designing.
wachaz
 
Posts: 49
Joined: Mon Sep 08, 2008 7:52 pm

Re: Custom KryptonPalettes

Postby Waescher » Fri Sep 26, 2008 1:24 am

No problem.

Just put a KryptonPalette on your form. It'll land on the ComponentPanel below the form.
Use the little context-arrow to import a xml-file (usually, I reset the palettes before importing some xml - I had a incomplete palette about 2 times after importing without resetting it first).
Now just select your palette as GlobalPalette on your KryptonManager-Instance.
Ready.
Waescher
 
Posts: 219
Joined: Thu Jun 14, 2007 10:11 pm
Location: Germany

Re: Custom KryptonPalettes

Postby wachaz » Fri Sep 26, 2008 4:07 am

Thanks for tips. My problem is that I create the Manager and the Palette at runtime from Program.cs. Do you have any tips for this situation?
wachaz
 
Posts: 49
Joined: Mon Sep 08, 2008 7:52 pm

Re: Custom KryptonPalettes

Postby Waescher » Fri Sep 26, 2008 4:53 am

So you create you KryptonManager at runtime? Hm, you won't be able to use your Manager at DesignTime.
Why don't you use a KryptonManager-Component on your MainForm? This is the way it's ment to be.
Waescher
 
Posts: 219
Joined: Thu Jun 14, 2007 10:11 pm
Location: Germany

Re: Custom KryptonPalettes

Postby wachaz » Sat Sep 27, 2008 4:02 am

That was the first way I used it. But later I've found out that I have many forms, and I shouldn't create a manager and a palette to every form, rather I can create one of those in program.cs and it will work for all of the program. I'm not sure that this makes my application lighter but seems to be cleaner. What do you think?
wachaz
 
Posts: 49
Joined: Mon Sep 08, 2008 7:52 pm

Re: Custom KryptonPalettes

Postby Chris Porter » Sat Sep 27, 2008 6:58 am

I create a KryptonPaletteForm that contains the KryptonManager and the KryptonPalette that I intend to use for the entire application. From there create an instance of this form whenever the application loads a form that is a parent and not a child to other forms. This also helps with load time of the form if I am opening/closing it a lot in VS as it doesn't have to parse all the Palette code on initialization. It does require that I open the KryptonPaletteForm whenever I load VS for the first time but its worth it.
Chris Porter
 
Posts: 714
Joined: Fri Oct 12, 2007 5:39 am
Location: Oklahoma City, OK, US

Re: Custom KryptonPalettes

Postby wachaz » Sat Sep 27, 2008 5:31 pm

Chris, thank you very much for the method, I'm trying but I just don't understand it. Could you please tell this a little "slower"? This is the point where I lost the path: "From there create an instance of this form whenever the application loads a form that is a parent and not a child to other forms." Thanks in advance.
wachaz
 
Posts: 49
Joined: Mon Sep 08, 2008 7:52 pm

Re: Custom KryptonPalettes

Postby Chris Porter » Sun Sep 28, 2008 12:33 pm

In my environment, I could have multiple "base" forms that are launched independently based on user need. As a result, I have multiple forms that need to share a Krypton Manager/Palette. Also, during development I noticed that a modified Krypton Palette caused my designer file to become much larger and it also slowed my form load times. To resolve this I moved both the Manager and the Palette to a form that does nothing other than act as a container.

When in design time, any settings I have changed on the Manager/Palette (such as defaulting it to Office 2007 Silver) do not apply to other base forms until the container form (KryptonPaletteForm) has been opened. The KryptonPaletteForm can be closed and VS will remember your settings.

To make the KryptonPaletteForm function at runtime you need to load the Manager/Palette into memory so your form will use it's settings. I do this by creating an instance of the form in the constructor of main form I am loading. Example:
Code: Select all
Public Sub New()
    Dim kryptonPaletteForm as New KryptonPaletteForm()

    InitializeComponents()
End Sub

Creating the instance is all I've needed to do to make this work. Hopefully this explanation helps you to understand. Let me know if you have any questions.
Chris Porter
 
Posts: 714
Joined: Fri Oct 12, 2007 5:39 am
Location: Oklahoma City, OK, US

PreviousNext

Return to Custom Palettes

Who is online

Users browsing this forum: No registered users and 1 guest