[1.0] Portlet - Hide close button

  1. #1

    [1.0] Portlet - Hide close button

    Hello!

    I've been playing arround with Ext.Net 1.0, and it's great so far...

    Now I've a litle problem with portlet. I'm not able to hide the close button. I've tried lots of things. If you could help...
    Shouldn't the closable property handle this?

    HideBorders does not seem to work as described also...

    If I use panel, the draggable does not work.

    SCENARIO: I want to allow a user to close or drag portlet if it has admin rights.

    I'm doing it in code behind only. Whith something like this:
    
                Ext.Net.HBoxLayoutConfig columnLayout = new HBoxLayoutConfig();
                this.LayoutConfig.Add(columnLayout);
                
    
                Ext.Net.Portal portal = new Portal();
                portal.ID = "portalPlaceHolder";
                
    
                portal.Layout = "Column";
                portal.MinHeight = new System.Web.UI.WebControls.Unit("600px");
                portal.Border = false;
    
                Ext.Net.PortalColumn column = new PortalColumn();
                
                column.ColumnWidth = 0.5;
                portal.Items.Add(column);
    
                Ext.Net.Portlet portlet1 = new Portlet();
                portlet1.ID = "Portlet1";
                column.Items.Add(portlet1);
    
                Ext.Net.PortalColumn column1 = new PortalColumn();
                column1.ColumnWidth = 0.5;
                
                Ext.Net.Portlet portlet2 = new Portlet();
                portlet2.ID = "Portlet2";
                portlet2.TitleCollapse = false;
                column1.Items.Add(portlet2);
    
                Ext.Net.Portlet portlet3 = new Portlet();
                portlet3.ID = "Portlet3";
                portlet3.Draggable = false;
                portlet3.Collapsible = false;
                portlet3.Closable = false; /* does nothing */
                
                portlet3.HideBorders = false ; /* does nothing */
                portlet3.Title = "texto";
                
                column1.Items.Add(portlet3);
    
                portal.Items.Add(column1);
  2. #2
    Hi,

    I guess that you add Close tool button manually (like in online example) because, by default, portlet has no close button
  3. #3
    Quote Originally Posted by Vladimir View Post
    Hi,

    I guess that you add Close tool button manually (like in online example) because, by default, portlet has no close button
    Hi, Vladimir.

    I'm feeling very silly, in fact I've copied the code that adds the button and forggot about it.. this explains a lot.. :o

    I also looked at the Ext.Net source code and it wasn't making any sense!


    Its solved thanks.. keep up the good work!

Similar Threads

  1. [CLOSED] Portlet Close Handler
    By gs_user in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 15, 2012, 10:37 AM
  2. How to display / hide 'close' button on Tab
    By Aod47 in forum 1.x Help
    Replies: 12
    Last Post: Dec 17, 2011, 11:07 AM
  3. Replies: 2
    Last Post: Dec 25, 2010, 11:07 AM
  4. [CLOSED] Add close (hide) tool button and event to Portlet
    By betamax in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 01, 2010, 1:16 PM
  5. [CLOSED] Notification: hide close button when AutoHide = false
    By jchau in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 16, 2009, 3:10 PM

Posting Permissions