Shoutbox

Simple question: disabled checkbox - 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: Simple question: disabled checkbox (/showthread.php?tid=87687)

Simple question: disabled checkbox by wincy on 12-11-2008 at 12:19 PM

That's what i'm trying to do: a disabled (checked) CheckboxControl.

i read official documentation, searched in forum and tried many times, with no success.

code:
<Control xsi:type="CheckboxControl" Id="blah" enabled="false">
    <Position Top="35" Width="10" Left="90" />
</Control>
Is this wrong?

I found also:
CheckBoxControl/CustomLook/Disabled/Checked/Element

but i still can't do that correctly. Any help? :S
RE: Simple question: disabled checkbox by Spunky on 12-11-2008 at 12:26 PM

To disable a checkbox you need to use the EnableWindow API with the relevant parameters


RE: Simple question: disabled checkbox by matty on 12-11-2008 at 12:27 PM

That should work it may be case sensitive:

code:
<Control xsi:type="CheckBoxControl" Id="blah" Enabled="False">
    <Position Top="35" Width="10" Left="90" />
</Control>

quote:
Originally posted by wincy
I found also:
CheckBoxControl/CustomLook/Disabled/Checked/Element
That is if you are giving the control a custom look.

What you can do otherwise is in your script disable it
code:
var pWin = MsgPlus.CreateWnd('mywindow.xml', 'mywindow');
Interop.Call('user32', 'EnableWindow', pWin.GetControlHandle('blah'), false);

RE: RE: Simple question: disabled checkbox by wincy on 12-11-2008 at 12:35 PM

quote:
Originally posted by matty
That should work it may be case sensitive:
code:
<Control xsi:type="CheckBoxControl" Id="blah" Enabled="False">
    <Position Top="35" Width="10" Left="90" />
</Control>


Too simple... it was really case sensitive! :P
I'll use it. Thanks for your help! :D