[0.8.1] Possible Anchor Bug

  1. #1

    [0.8.1] Possible Anchor Bug

    Hi,

    I was using anchors inside a form layout to display elements, including a button. If I set a horizontal width on the anchor for the button, it created errors with any code after that.

    I tried to find out if the Button was not supposed to be placed directly in an anchor, but I didn't find anything at extjs or here saying that. If the button is placed in a Panel and then in the anchor, everything renders correctly.

    Here is some simplified code:

        <ext:Window ID="Window3" runat="server" Width="300">
            <Body>
                <ext:Panel ID="Panel10" runat="server" Border="false" Header="false">
                    <Defaults>
                        <ext:Parameter Name="MsgTarget" Value="side" />
                    </Defaults>
                    <Body>
                        <ext:FormLayout ID="FormLayout4" runat="server" LabelAlign="Top">
                            <ext:Anchor Horizontal="92%">
                              <ext:Button runat="server" Text="Save Me" />
                            </ext:Anchor>
                        </ext:FormLayout>
                    </Body>
                 </ext:Panel>
            </Body>
        </ext:Window>
        <ext:Window ID="Window4" runat="server" Width="300">
           <Body>
               <ext:Panel ID="Panel11" runat="server" Border="false" Header="false" />
    
            </Body>
         </ext:Window>
    I think that should reproduce the error I received. basically when trying to do anything on the next window I received a javascript error that it isn't a function.

    This may be by design, but as I said I didn't see anything in the ExtJS or here about not using anchor on a button. If it is, my apologies for the misunderstanding.
  2. #2

    RE: [0.8.1] Possible Anchor Bug

    Hi,

    Button is not resizable control (it resizable since 1.0 version only)
    Therefore your code is not working. Wrap button by panel

Similar Threads

  1. Anchor in Ext.Net
    By rach in forum 2.x Help
    Replies: 0
    Last Post: May 13, 2012, 9:37 AM
  2. 2 TextField next to each other in one anchor.
    By Bert76 in forum 1.x Help
    Replies: 1
    Last Post: May 14, 2011, 10:00 AM
  3. [CLOSED] Margins and Anchor
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 25, 2011, 6:53 PM
  4. How to set a Anchor' Row's background?
    By tangcan2003 in forum 1.x Help
    Replies: 0
    Last Post: Dec 14, 2009, 9:01 PM
  5. 2 control in Anchor
    By olimpia in forum 1.x Help
    Replies: 3
    Last Post: Jun 16, 2009, 5:46 PM

Posting Permissions