and even if I put an empty FieldLabel I still see some space and a colon.
Printable View
and even if I put an empty FieldLabel I still see some space and a colon.
Hello!
To hide FieldLabel please use the HideLabels property of field's container.
Example
Code:<ext:FormPanel runat="server" HideLabels="true">
Hi Daniil,
if I use FormLayout.HideLabels, all the field labels will be hidden. That is not what I want.
What I want is when I hide a Label control, also its FieldLabel to be hidden. This works fine with other controls, such as the TextField, but it doesn't work with the Label
Hello!
Please tell what behavior do you expect from this sample code?
Clicking on the button Hide Label causes disappearing the Label1 and its FieldLabel.
Example
Please provide us with a sample code which demonstrates the issue.Code:<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ext.Net Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:FormPanel runat="server" Width="300">
<Items>
<ext:TextField ID="TextField1" runat="server" FieldLabel="FieldLabel1"/>
<ext:Label
ID="Label1"
runat="server"
Text="Some label"
FieldLabel="FieldLabel2"/>
<ext:ComboBox ID="ComboBox1" runat="server" FieldLabel="FieldLabel3"/>
</Items>
<Buttons>
<ext:Button runat="server" Text="Hide TextField">
<Listeners>
<Click Handler="TextField1.hide();"/>
</Listeners>
</ext:Button>
<ext:Button runat="server" Text="Hide Label">
<Listeners>
<Click Handler="Label1.hide();"/>
</Listeners>
</ext:Button>
</Buttons>
</ext:FormPanel>
</form>
</body>
</html>
I tested this as well and the <ext:Label> does appear to hide it's FieldLabel correctly.
Example
Code:<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ext.Net Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:FormPanel runat="server" Width="300">
<Items>
<ext:TextField ID="TextField1" runat="server" FieldLabel="FieldLabel1" />
<ext:Label ID="Label1" runat="server" Text="Some label" FieldLabel="FieldLabel2" />
<ext:ComboBox ID="ComboBox1" runat="server" FieldLabel="FieldLabel3" />
</Items>
<Buttons>
<ext:Button runat="server" Text="Hide TextField" OnClientClick="TextField1.hide();" />
<ext:Button runat="server" Text="Hide Label" OnClientClick="Label1.hide();" />
</Buttons>
</ext:FormPanel>
</form>
</body>
</html>