Profile Picture

Load default scheme

Posted By Gary Smith 15 Years Ago
Author
Message
Gary Smith
Posted 14 Years Ago
View Quick Profile
Forum Member

Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 39, Visits: 1

Not a show stopper, lol... thanks for the reply!

 



Angel Chorbadzhiev
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 139, Visits: 184

Hi Gary,

Unfortunately you cannot add a new predefined palette in Palette Editor.

Regards,

Angel.



Gary Smith
Posted 15 Years Ago
View Quick Profile
Forum Member

Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 39, Visits: 1

Angel, one last question on this subject....

Is it possible to add a custom name in the edit Palette control you provide? I would like to name a palette 'HCMS'  (Name of the program). Is that possible?

Thanks
Gary

 



Gary Smith
Posted 15 Years Ago
View Quick Profile
Forum Member

Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 39, Visits: 1

Angel, thanks! I would never have gotten that.... appreciate the help!

Wish you, your family and all the members of NEVRON a VERY MERRY CHRISTMAS!

Gary

 



Angel Chorbadzhiev
Posted 15 Years Ago
View Quick Profile
Supreme Being

Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 139, Visits: 184

Hi Gary,

To save a palette in specified location without getting a Save File Dialog you need to use SaveToFile method.

To load previously saved palette from a specified location call FromFile method.

This method has two parameters first one is a file name and the second one is the type that you save palette is. In your case this is NUIPalette. Also you need to cast the value that this method returns to NUIPalette.

'Saving palette

NUIManager.Palette.SaveToFile(fileName)

'Loading palette

Dim palette As NUIPalette = TryCast(NUIPalette.FromFile(fileName, GetType(NUIPalette)), NUIPalette)

NUIManager.Palette = palette

Regards,

 Angel.



Gary Smith
Posted 15 Years Ago
View Quick Profile
Forum Member

Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 39, Visits: 1

Hi Angel,

I tried the methods you suggest however,

The methods NUIPalette.Load and .Save do not exist Or maybe I'm calling it wrong. I tried  NUIManager.Palette.Load() but it brings up the interface instead of just loading the file ("hcms.xml"). The NUIPalette only allows FromFile() which asks for a filepath as string - no problem, but also requires a System.Type which I'm not sure what its looking for.

To clarify what I need to do:

 

1) Open up the editor by calling NuiManagerController1.Palette.ShowEditor()

2) allow the user to select thier color scheme

3) Save the color scheme to a file (default filename if possible)

4) Change the scheme on the fly (doing this no problem)

5) Load the saved scheme/file on startup without interaction from the user

 

Hope that helps.


Thanks
Gary

 



Angel Chorbadzhiev
Posted 15 Years Ago
View Quick Profile
Supreme Being

Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 139, Visits: 184

Hi Gary,

 

You can save and load a NUIPalette into a file using NUIPalette.Save and NUIPalette.Load or NUIPalette.SaveToFile and NUIPalette.FromFile methods.

 

Regards,

Angel.



Gary Smith
Posted 15 Years Ago
View Quick Profile
Forum Member

Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)Forum Member (39 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 39, Visits: 1

Hi, I'm calling teh NUIManager ShowEditor() and everything works fine there. However, I want my users to be able to select thier default scheme, and have that load when the program loads. I'm not sure how to acomplish saving the default scheme the user selected, nor how to recall it... can you give me an example?  Using VB Visual Studio 2008. Thanks.

Gary

 





Similar Topics


Reading This Topic