[CLOSED] Unable to stretch ext:TextField to width of FitLayout Panel correctly

  1. #1

    [CLOSED] Unable to stretch ext:TextField to width of FitLayout Panel correctly

    I have a simple user control that contains among other usercontrols, a couple of standard <ext:TextFields>. All of these controls are within a <ext:FitControl>. The TextField has an IndicatorIcon attribute that seems to get stretched to the width of the container FitControl, but the input field itself does not. How do I get the input field to stretch as well ?

    Here is the code of the usercontrol. This UserControl is also placed within another UserControl (with a FitLayout container)

    See attachment for how this is being rendered.

    <ext:FitLayout ID="tt" runat="server" AnchorHorizontal="100%" >
        <Content>        
            <nxt:LocCmb ID="LocListCmbTree" runat="server" Title="Parent Location" />
            <ext:TextField ID="txtlocationName" runat="server" FieldLabel="Location Name" IndicatorTip="Required field"
                IndicatorIcon="BulletRed" IDMode="Explicit" AnchorHorizontal="100%"  />                
            <nxt:LocList ID="nxtLocCmb" runat="server" Title="Location Type" StoreBaseParams="<%# CodeTypeSystemCode %>">
             </nxt:LocList>
            <ext:TextField ID="txtDescription" runat="server" FieldLabel="Description" 
                IDMode="Explicit" AnchorHorizontal="100%"/>
             <nxt:PriCmb ID="PriCmb1" runat="server" Title="Primary Contact" />
        </Content>
    </ext:FitLayout>
    Click image for larger version. 

Name:	StretchProblem.GIF 
Views:	98 
Size:	17.5 KB 
ID:	3315
    Last edited by Daniil; Oct 14, 2011 at 4:24 PM. Reason: [CLOSED]
  2. #2
    In my case, I had my works (AnchorHorzontal="100%") done using FormPanel. Not sure if you would prefer using that in yours.
  3. #3
    FitLayout manages one item only
    Use AnchorLayout (do not use Content, use Anchors collection)
  4. #4
    Quote Originally Posted by Vladimir View Post
    FitLayout manages one item only
    Use AnchorLayout (do not use Content, use Anchors collection)
    Unfortunately I cannot use the <Anchors> collection because I have my user controls embedded also that need to be included and they are not of type
    Ext.Net.Anchor. It appears as if I can only use the <Content> collection ?

    Here is the error I get when I try to use the AnchorLayout with Anchors collection ...

    ------
    Parser Error Message: Ext.Net.AnchorCollection must have items of type 'Ext.Net.Anchor'. 'nxt:LocCmb' is of type 'ASP.views_shared_usercontrols_locationcollection_ascx'.
    
    Source Error: 
    
    
    Line 30: <ext:AnchorLayout ID="tt" runat="server" AnchorHorizontal="100%" >
    Line 31: <Anchors>
    Line 32:         <nxt:LocCmb ID="LocListCmbTree" runat="server" Title="Parent Location" />
    Line 33:         <ext:TextField ID="txtlocationName" runat="server" FieldLabel="Location Name" IndicatorTip="Required field"
    Line 34:             IndicatorIcon="BulletRed" IDMode="Explicit" AnchorHorizontal="100%"  />
    ----------
    Last edited by geoffrey.mcgill; Oct 11, 2011 at 3:55 AM. Reason: please use [CODE] tags
  5. #5
    Well, it's true: any layout logic can't be applied for non-Ext.Net components.

    We thought that <nxt:LocCmb> is a custom control inherited from some Ext.Net control.

    You can try to wrap that user control is an <ext:Container>. But you should care about layout of this container yourself.

Similar Threads

  1. [CLOSED] TextField 100% Width inside a Panel in a FormPanel
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 11, 2011, 10:43 AM
  2. [CLOSED] Not stretch User Control in Tab panel
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 28, 2011, 8:23 AM
  3. Can I stretch a TextArea control inside a Panel?
    By paul-2011 in forum 1.x Help
    Replies: 7
    Last Post: Aug 26, 2010, 10:55 PM
  4. Replies: 6
    Last Post: Jun 11, 2010, 12:47 PM
  5. Replies: 2
    Last Post: Apr 23, 2009, 5:49 PM

Posting Permissions