[CLOSED] TagField MaxHeight

  1. #1

    [CLOSED] TagField MaxHeight

    Hi there

    The TagField control doesn't appear to respect the MaxHeight property. For example, if I write a method to add 100 tags to a field through the addTag method, the field continues to grow beyond the value set in MaxHeight.

    I have also tried setting GrowMax to the same value, with no luck.

    I can produce an example if required. I'm on Ext.Net 2.5.2.10697.
    Last edited by Daniil; Jul 09, 2015 at 3:42 PM. Reason: [CLOSED]
  2. #2
    Hello,

    You probably refer to something like:

    <%@ Page Language="C#" AutoEventWireup="true" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <script>
            var addTags = function () {
                for (var i = 0; i < 100; i++)
                    App.TagField1.addTag(i);
            }
        </script>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
    
        <ext:TagField 
            runat="server" 
            ID="TagField1"
            Width="200"
            MaxHeight="200"
            HideTrigger="true"
            Editable="false">
        </ext:TagField>  
    
        <ext:Button runat="server" Text="Add" >
            <Listeners>
                <Click Fn="addTags" />
            </Listeners>
        </ext:Button>      
    </body>
    </html>
    I am not quite sure how it should behave, though. It is basically a Combobox; How would you expect it to render?
  3. #3
    That example is spot on. What I was hoping to do was enable AutoScroll and have the field grow up to its maximum height and scroll the overflow.
  4. #4
    What about using a container, for example:

    <%@ Page Language="C#" AutoEventWireup="true" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <script>
            var addTags = function () {
                for (var i = 0; i < 100; i++)
                    App.TagField1.addTag(i);
            }
    
        </script>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
    
        <ext:FieldContainer 
            runat="server"
            Width="200"        
            Height="200"
            AutoScroll="true">
            <Items>
                <ext:TagField 
                    runat="server" 
                    ID="TagField1"
                    Width="180"
                    HideTrigger="true"
                    Editable="false">
                </ext:TagField>  
            </Items>
        </ext:FieldContainer>
    
        <ext:Button runat="server" Text="Add" >
            <Listeners>
                <Click Fn="addTags" />
            </Listeners>
        </ext:Button>      
    </body>
    </html>
  5. #5
    I hadn't thought of that. Good idea! Can I hide the border of the TagField?
  6. #6
    I think it should be possible via CSS. You can set a TagField's .Cls property and define a CSS rule to get rid of the border.

Similar Threads

  1. [OPEN] [#772] TagField Listeners
    By RCN in forum Bugs
    Replies: 2
    Last Post: Mar 27, 2015, 9:36 PM
  2. [CLOSED] TagField : How to allow duplicate Tag in TagField
    By matrixwebtech in forum 2.x Legacy Premium Help
    Replies: 13
    Last Post: Dec 31, 2014, 1:51 PM
  3. [CLOSED] Callout: MaxHeight Issue
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 19, 2014, 12:57 PM
  4. AutoHeight with MaxHeight
    By huzzy143 in forum 1.x Help
    Replies: 4
    Last Post: Apr 11, 2012, 1:30 PM
  5. Replies: 1
    Last Post: Sep 20, 2011, 9:42 AM

Tags for this Thread

Posting Permissions