Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: [FIXED] [1.2.1] BorderLayout splitter is no longer functional

  1. #1

    Default [FIXED] [1.2.1] BorderLayout splitter is no longer functional

    Previous to GXT 1.2.1 if I called setSplit( true ) on the BorderLayoutData that is associated with a BorderLayout, I would get a functioning splitter. The mouse cursor would change shape when hovering over the splitter. Grabbing and dragging the splitter would change the size of the adjacent areas of the BorderLayout.

    In GXT 1.2.1, the mouse cursor does not change shape when hovering over the splitter, and dragging the splitter does nothing.

    Sample code:

    viewport = new Viewport();
    BorderLayout borderLayout = new BorderLayout();
    viewport.setLayout(borderLayout);

    BorderLayoutData northData = new BorderLayoutData(LayoutRegion.NORTH );
    northData.setSplit(true);
    northData.setMinSize( 150 );
    northData.setMaxSize( 500 );
    northData.setSize( 150 );

    ContentPanel northCP = new ContentPanel(new FitLayout());
    northCP.setFooter( false );

    BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER );
    centerData.setMinSize( 120 );

    ContentPanel centerCP = new ContentPanel(new FitLayout());
    centerCP.setFooter( false );

    viewport.add( northCP, northData );
    viewport.add( centerCP, centerData );

    // add the panels that will not get displayed
    ContentPanel westCP = new ContentPanel(new FitLayout());
    westCP.setBounds(0, 0, 0, 0);
    BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST );
    westData.setSize( 0 );

    ContentPanel eastCP = new ContentPanel(new FitLayout());
    eastCP.setBounds(0, 0, 0, 0);
    BorderLayoutData eastData = new BorderLayoutData(LayoutRegion.EAST );
    eastData.setSize( 0 );

    ContentPanel southCP = new ContentPanel(new FitLayout());
    southCP.setBounds(0, 0, 0, 0);
    BorderLayoutData southData = new BorderLayoutData(LayoutRegion.SOUTH );
    southData.setSize( 0 );

    viewport.add( westCP, westData );
    viewport.add( eastCP, eastData );
    viewport.add( southCP, southData );

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    Hello,

    http://extjs.com/explorer/#borderlayout works fine for me and uses setSplit(true). Is it working for you?

    Sven

  3. #3

    Default Correct, it works

    Hi Sven,

    Thanks for the tip.

    Prior to GXT 1.2.1, I could use the default margin size, and still get access to the splitter. As of 1.2.1, unless I supply a non-default margin size, I can't "grab" the splitter. Now that I am supplying a non-default margin size, I can grab the splitter, and things work as they should.

    Code sample that fixed the problem:

    BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER );
    centerData.setMinSize( 120 );
    centerData.setMargins(new Margins(5, 5, 0, 5));

  4. #4
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    I am still not able to reproduce this. I deleted all margin calls from the explorer and it is still working. Have you tried that for you? Also which browser are you using?

  5. #5

    Default

    The problem exists for me in Firefox, Safari, and Safari in hosted mode (I develop on a Mac).

    Notice in my sample code that the east, west, and south border layouts have a size of 0. (i.e. southData.setSize( 0 ); )

    Like I said, it works fine as long as a set a non-zero margin.

  6. #6
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    Your are trying to resize the regions which are set to 0?

  7. #7

    Default

    No, I am not trying to resize the regions whose sizes are set to zero.

    I am using the BorderLayout to implement a split panel. The east, west, and south regions are NOT displayed, resulting in a BorderLayout that looks like it just has 2 panels in it. The splitter is between the 2 panels (north and center). The splitter can be used to resize the north and center regions.

  8. #8
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    If you dont need some regions, just dont add them

    I cant reproduce your issue. Also if i dont set any margins, i can resize it.

  9. #9
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    I was just aple to reproduce it. We will look into it.

  10. #10

    Default

    Great, thank you for looking into it. I tried your suggestion on not adding the regions that I don't need, and of course it works fine.

    Thank you for the suggestion.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •