[CLOSED] Expand panel when click on the title

  1. #1

    [CLOSED] Expand panel when click on the title

    Hi folks, i have a panel with TitleCollapse property set to true but when i click the title it expands the panel "partially". I would like to know whether it´s possible to make clicking on the title act like clicking the Collapse Tool.
    Last edited by Daniil; Jun 06, 2012 at 12:15 PM. Reason: [CLOSED]
  2. #2
    Hi,

    It appears clicking on title and collapse tool causes the same effect in the following example.

    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 v2 Example</title>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
            
        <ext:Panel 
            runat="server" 
            Width="200" 
            Height="200" 
            Collapsible="true" 
            TitleCollapse="true"
            BodyStyle="background-color: green;" />
    </body>
    </html>
  3. #3
    if you click outside the panel it will collapse.
  4. #4
    Seems nothing happens when I click outside the Panel in my example.

    Did I miss or misunderstand something?
  5. #5
    i am gonna prepare a running example for explain better.
  6. #6
    Hi Daniil, i would like that the South region of my example acts like your example. When the title is clicked, it just expand "partially" and the BeforeExpand event is not raised and if i click outside the south region, it will collapse.

    <ext:Window ID="Window2" runat="server" Title="Region" Icon="Application"
        Width="600" Height="350" X="100" Y="100"
        Layout="BorderLayout">
        <Items>
            <ext:Panel ID="Panel1" runat="server" Region="Center" Title="Center region" />
            <ext:Panel ID="SouthPanel" runat="server" Title="South" Region="South" Collapsible="true"
                MinHeight="100" Split="true" Height="100" TitleCollapse="false" Collapsed="true">
                <Listeners>
                    <BeforeExpand Handler="alert('before expand');" />
                </Listeners>
            </ext:Panel>
        </Items>
    </ext:Window>
    In your example when i click the title it will be fully expand and will raise the BeforeExpand event
    <ext:Panel ID="Panel2" runat="server" Width="200" Height="200" Collapsible="true"
        TitleCollapse="true" BodyStyle="background-color: green;">
        <Listeners>
            <BeforeExpand Handler="alert('before expand');" />
        </Listeners>
    </ext:Panel>

    Maybe it´s not possible to have this behaviour when using BorderLayout but i think that at least the BeforeExpand event should be raised.

    Thanks in advance
  7. #7
    Well, you should set up
    Floatable="false"
    for the south Panel.
    http://docs.sencha.com/ext-js/4-1/#!...-cfg-floatable

    And
    TitleCollapse="true"
    http://docs.sencha.com/ext-js/4-1/#!...-titleCollapse
  8. #8
    Thank you Daniil, please mark it as resolved

Similar Threads

  1. [CLOSED] How do I disable the TreePanel expand on double click
    By Labyrinth in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 12, 2012, 11:47 AM
  2. Replies: 1
    Last Post: Mar 13, 2012, 8:37 AM
  3. Replies: 7
    Last Post: Nov 13, 2011, 4:43 PM
  4. [CLOSED] Toolbar on panel title
    By jeybonnet in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Apr 07, 2011, 3:05 PM
  5. Replies: 2
    Last Post: Dec 28, 2010, 9:47 PM

Posting Permissions