PDA

View Full Version : [CLOSED] Checkbox is being toggled when its label is clicked



RCN
Feb 09, 2015, 12:47 PM
On the following example, checkbox is being toggled when its lable is clicked, even on lable's "empty" region.

I wonder whether it's the expected behaviour.

http://forums.ext.net/attachment.php?attachmentid=20641&stc=1


<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
</head>
<body>
<ext:ResourceManager runat="server" Theme="Gray" ScriptMode="Debug" />
<ext:FormPanel Title="Ext.Net" Width="300" DefaultAnchor="100%" runat="server">
<FieldDefaults LabelAlign="Top" />
<Items>
<ext:Checkbox FieldLabel="Field 1" runat="server" />
<ext:TextField FieldLabel="Field 2" runat="server" />
</Items>
</ext:FormPanel>
</body>
</html>


Thanks in advance.

bbros
Feb 09, 2015, 9:33 PM
Hi Raphael, I will not give you a technical answer, I don't know if it is the expected behavior.

Personally I prefer it as well.
That is the typical Windows applications behavior and usually creating a windows form we give the checkbox the same width of their container in order to activate the mark clicking on the text or in the same line.

Daniil
Feb 10, 2015, 2:24 PM
Hi everybody,

I would say the behavior is expected. At least, a FieldLabel is rendered as a <label> with a for attribute intentionally. And that is the behavior of that for attribute.

RCN
Feb 10, 2015, 2:55 PM
Thank you @bbros and Daniil, i agree with both of you.

Please mark this thread as closed.