Sign in to follow this  
MJW

OnCustomizeConfigUIWindowProperties: What can it do?

Recommended Posts

MJW    637

There's a method in the PropertyBasedEffects called OnCustomizeConfigUIWindowProperties. It's used to change the window title and initialize the Help menu, but I was wondering when exactly it gets called, and what else, if anything, can be done with it? In other words, is there anything else plugin programmers might want to use it for?

 

The code to change the window title is:

       protected override void OnCustomizeConfigUIWindowProperties(PropertyCollection props)
       {
           // Change the effect's window title
           props[ControlInfoPropertyNames.WindowTitle].Value = "New Window Title";
           base.OnCustomizeConfigUIWindowProperties(props);
       }

 

Share this post


Link to post
Share on other sites
toe_head2001    792

If you want to change the width of the dialog, assign a double to the value when using the WindowWidthScale enum.

props[ControlInfoPropertyNames.WindowWidthScale].Value = 1.5d;

 

If you want to make the dialog user-resizable, assign a boolean to the value when using the WindowIsSizable enum.

props[ControlInfoPropertyNames.WindowIsSizable].Value = true;

 

  • Upvote 2

Share this post


Link to post
Share on other sites
MJW    637

I take it then that (as the name suggests) OnCustomizeConfigUIWindowProperties is used to modify the UI windows characteristics. Can it be said that OnCustomizeConfigUIWindowProperties is used exclusively to modify the UI windows characteristics, so it has no other uses?

Share this post


Link to post
Share on other sites
toe_head2001    792

I'm not sure you'd be able to use OnCustomizeConfigUIWindowProperties() for anything else, as it's called before the Dialog is even created.

That is to say, it just gets some more properties to use in the Dialog's constructor.

Share this post


Link to post
Share on other sites
MJW    637

Thanks, toe_head2001. I was, of course, hoping it had incredible secret powers. Nevertheless the window adjustments might prove useful for some plugins.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this