CompletIT Community Server

Welcome to CompletIT Community Server Sign in | Join | Help

Custom pre-set theme for all users

  •  01-31-2008, 7:34 PM

    Custom pre-set theme for all users

    Hello guys,

    I am developing a little application at the moment and I am also using your fabulous DGVE. Thanks a lot guys, this extension is a great extra for all those developers considering to use a DataGridvView.

    The only thing I wanna know is if it's possible to define a default theme for all users of my application somewhere in the code. I want the application to look the same for all users when they load the software for the first time. How do you set this default theme in the code? I already had a few trial&error coding done, but it didn't work out. Have a look at the few lines of code below. If a debug this section, the debugger comes up with an System.NullReferenceException "Message="Object reference not set to an instance of an object. Source="DataGridViewExtension"

             ' initialaze new theme       
             Dim dgve_theme As New DGVESettings(DGVENotDataSourceSpecificSettings.Default, DGVEDataSourceSpecificSettings.Default)

             ' set properties, name, ...       
            dgve_theme.NotDataSourceSpecificSettings.StylesSettings.GridColor = Color.Brown
            dgve_theme.PropertyName = "def"

            ' save theme and set it as default
            DGVEThemesManager.SaveTheme(dgve_theme)
            DGVEThemesManager.SetDefaultTheme("def")

    Can you give me some tips? How do I configure the application to only set the pre-defined default theme on the first start of the application?

     

    Best regards and greetings from Beijing,
    David

    Filed under: ,
View Complete Thread
Powered by Community Server (Personal Edition), by Telligent Systems