Shoutbox

Enable property - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Enable property (/showthread.php?tid=85246)

Enable property by Noixe on 08-07-2008 at 12:23 PM

Hello

Is there a property to disable a combobox?

I would a fuction as:

Wnd.Combo_Enable("MyComboBox", false);


Bye


RE: Enable property by Spunky on 08-07-2008 at 01:12 PM

It requires calling the EnableWindow API via Inteorp.Call and cannot be done by Plus! (currently a limitation)

code:
Interop.Call("user32", "EnableWindow", PlusWnd.GetControlHandle("YourControl"), false);

RE: Enable property by Matti on 08-07-2008 at 01:13 PM

There isn't such a function in the native Plus! Live scripting API which can do this, but you can do this very easily with the Windows API.

code:
Interop.Call("user32", "EnableWindow", Wnd.GetControlHandle("MyComboBox"), false);
where:
  • Wnd is your PlusWnd object.
  • "MyComboBox" is the ID of the control to enable/disable.
  • false can be true or false, whether you want to enable or disable the control.
You can use this on anything which has a valid handle: all kinds of controls (with Wnd.GetControlHandle(...) ) and windows (with Wnd.Handle).
RE: Enable property by Noixe on 08-07-2008 at 01:53 PM

Thanks!