[CLOSED] label.Hide() does not hide FieldLabel

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] label.Hide() does not hide FieldLabel

    and even if I put an empty FieldLabel I still see some space and a colon.
    Last edited by Daniil; Aug 13, 2010 at 5:18 PM. Reason: [CLOSED]
  2. #2
    Hello!

    To hide FieldLabel please use the HideLabels property of field's container.

    Example
    <ext:FormPanel runat="server" HideLabels="true">
  3. #3
    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
  4. #4
    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
    <%@ 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>
    Please provide us with a sample code which demonstrates the issue.
  5. #5
    I tested this as well and the <ext:Label> does appear to hide it's FieldLabel correctly.

    Example

    <%@ 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>
    Geoffrey McGill
    Founder

Similar Threads

  1. [CLOSED] [#109] How to hide label in pie chart when value is 0
    By Fahd in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Mar 14, 2013, 11:48 AM
  2. hide textfield label
    By [WP]joju in forum 1.x Help
    Replies: 5
    Last Post: Dec 10, 2009, 11:11 PM
  3. Replies: 3
    Last Post: Jun 18, 2009, 6:57 AM
  4. [CLOSED] Can't hide TextField label
    By methode in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 02, 2009, 12:19 PM
  5. Replies: 1
    Last Post: Feb 03, 2009, 6:44 AM

Posting Permissions