Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    [BUG] ListGrid::setFilterButtonProperties places the button on the wronge place

    Hello,

    the customization of the filter button in a ListGrid is broken. The button is placed far away from the grid not in the same place as the default filter button. I've testet also with the latest nighly (11.12.2013) version of smartgwt 4.0p.

    Here is the TestCase:

    Code:
    	@Override
    	public void onModuleLoad() {
    		ListGrid lg = new ListGrid();
    		lg.setShowFilterEditor(true);
    		lg.setFields(new ListGridField("foo"));
    		lg.setWidth100();
    		lg.setHeight100();
    
    		Button button = new Button();
    		button.setPrompt("Click this button to filter the data");
    		lg.setFilterButtonProperties(button);
    
    		VLayout vLayout = new VLayout(10);
    		vLayout.setMembers(new Label("top"), lg, new Label("bottom"));
    		vLayout.setWidth100();
    		vLayout.setHeight100();
    
    		HLayout hLayout = new HLayout(10);
    		hLayout.setMembers(new Label("left"), vLayout, new Label("right"));
    		hLayout.setWidth100();
    		hLayout.setHeight100();
    
    		hLayout.draw();
    	}

    #2
    Hello,

    is there any plan to look into this issue? The problem still exitsts in the latest nighlty build (LGPL - 4.0p 31.01.2014)

    regards
    Andreas

    Comment


      #3
      I'm having a similar issue. I'm trying to use listGrid.setFilterButtonProperties to replace this button with a better description upfront... like "Lookup".
      I'm using the method "setFilterButtonProperties".
      I set it with a button that has a title "Lookup", but that text didn't show up.
      I then tried a button with an Icon that was just basically an image "Lookup", but it was cut off, even when I set the size of the button...

      Click image for larger version

Name:	Capture.JPG
Views:	69
Size:	8.9 KB
ID:	242089


      Full code...
      Button lookup = new Button("Lookup");
      lookup.setIcon("lookup.png");
      lookup.setIconHeight(9);
      lookup.setIconWidth(45);
      lookup.setWidth(45);

      ListGrid grid = new ListGrid(DataSource.get("datasourceX"));
      grid.setShowFilterEditor(true);
      grid.setFilterButtonProperties(lookup);
      Last edited by bellt; 4 Jan 2017, 12:46.

      Comment


        #4
        Which is it you're trying to do? Are you having trouble setting a prompt as the previous poster said?

        What rendering were you hoping for? The full word "lookup" clearly won't fit, so how did you want it to look?

        Comment


          #5
          I would like to render something more descriptive. Is there a way to make room for "lookup" so that it will fit? Thanks.

          Comment


            #6
            What would that look like? It couldn't expand to the left, since it would cover the FilterEditor. Expanding in any other direction would make the grid non-rectangular. A better choice would to simply place such a button above the grid, in a Toolstrip or similar. You may discover other functions that could also be in the same Toolstrip, so that space isn't burned just for one button.

            Comment


              #7
              Ok. Works for me. Thank you.

              Comment

              Working...
              X