Not a show stopper, lol... thanks for the reply!
Hi Gary,
Unfortunately you cannot add a new predefined palette in Palette Editor.
Regards,
Angel.
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?
ThanksGary
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
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
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.
You can save and load a NUIPalette into a file using NUIPalette.Save and NUIPalette.Load or NUIPalette.SaveToFile and NUIPalette.FromFile methods.
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.