Results 1 to 4 of 4

Thread: [2.2] Toggle button opens hidden

  1. #1
    Ext GWT Premium Member mariusz.pala's Avatar
    Join Date
    Jun 2008
    Location
    Poland
    Posts
    306

    Default [2.2] Toggle button opens hidden

    Hi,

    I have a content panel with a toolbar:

    Code:
    		final ToolBar viewToolBar = new ToolBar();
    
    		final ToggleButton detailsViewTool = new ToggleButton(CaraMessages.INSTANCE.viewDetails());
    		detailsViewTool.setItemId(RepositoryDetailsView.VIEW_ID);
    		detailsViewTool.setIcon(AbstractImagePrototype.create(CaraIcons.INSTANCE.viewDetailsIcon()));
    		detailsViewTool.setToolTip(CaraMessages.INSTANCE.viewDetails());
    
    		final ToggleButton listViewTool = new ToggleButton(CaraMessages.INSTANCE.viewList());
    		listViewTool.setItemId(RepositoryListView.VIEW_ID);
    		listViewTool.setIcon(AbstractImagePrototype.create(CaraIcons.INSTANCE.viewListIcon()));
    		listViewTool.setToolTip(CaraMessages.INSTANCE.viewList());
    
    		final ToggleButton thumbViewTool = new ToggleButton(CaraMessages.INSTANCE.viewThumbnails());
    		thumbViewTool.setItemId(RepositoryThumbnailView.VIEW_ID);
    		thumbViewTool.setIcon(AbstractImagePrototype.create(CaraIcons.INSTANCE.viewThumbnailsIcon()));
    		thumbViewTool.setToolTip(CaraMessages.INSTANCE.viewThumbnails());
    
    		viewToolBar.add(detailsViewTool);
    		viewToolBar.add(listViewTool);
    		viewToolBar.add(thumbViewTool);
    		viewToolBar.add(new SeparatorToolItem());
    
    		detailsViewTool.toggle(true);
    
    		Button excelButton = new Button(CaraMessages.INSTANCE.buttonExportToExcel(), AbstractImagePrototype.create(CaraIcons.INSTANCE
    				.formatXlsIcon()), new SelectionListener<ButtonEvent>() {
    			@Override
    			public void componentSelected(ButtonEvent ce) {
    			};
    		});
    		excelButton.setToolTip(CaraMessages.INSTANCE.buttonExportToExcel());
    		viewToolBar.add(excelButton);
    
    		viewContentPanel.setTopComponent(viewToolBar);
    It works fine for any browser except IE6, sometimes some labels are hidden:icons hidden (1).png

    It's hard to write some example for that, cause I don't have even IE6, but our customers reports that very often.

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

    Default

    If you cant post a testcase, than you should try to describe what you are doing to reproduce this. Also what do you mean with "opens hidden"?

  3. #3
    Ext GWT Premium Member mariusz.pala's Avatar
    Join Date
    Jun 2008
    Location
    Poland
    Posts
    306

    Default

    On the screenshot above there should be label "Details" after first icon. This is a top component toolbar of content panel inside BorderLayout (see the screenshot below). Only on IE6 the some labels are sometimes not visible. explorer.png

    This is how I add the center panel:


    Code:
    		viewContentPanel = new ContentPanel();
    		viewContentPanel.setLayout(new FitLayout());
    		viewContentPanel.setHeading(CaraMessages.INSTANCE.content());
    		viewContentPanel.setBodyBorder(false);
    		viewContentPanel.setFrame(false);
    
    		BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
    		centerData.setMargins(new Margins(0, 0, 0, 0));
    
    		borders.add(viewContentPanel, centerData);
    And that's how the toolbar is created:

    Code:
    		final ToolBar viewToolBar = new ToolBar();
    
    		final ToggleButton detailsViewTool = new ToggleButton(CaraMessages.INSTANCE.viewDetails());
    		detailsViewTool.setItemId(RepositoryDetailsView.VIEW_ID);
    		detailsViewTool.setIcon(AbstractImagePrototype.create(CaraIcons.INSTANCE.viewDetailsIcon()));
    		detailsViewTool.setToolTip(CaraMessages.INSTANCE.viewDetails());
    
    		final ToggleButton listViewTool = new ToggleButton(CaraMessages.INSTANCE.viewList());
    		listViewTool.setItemId(RepositoryListView.VIEW_ID);
    		listViewTool.setIcon(AbstractImagePrototype.create(CaraIcons.INSTANCE.viewListIcon()));
    		listViewTool.setToolTip(CaraMessages.INSTANCE.viewList());
    
    		final ToggleButton thumbViewTool = new ToggleButton(CaraMessages.INSTANCE.viewThumbnails());
    		thumbViewTool.setItemId(RepositoryThumbnailView.VIEW_ID);
    		thumbViewTool.setIcon(AbstractImagePrototype.create(CaraIcons.INSTANCE.viewThumbnailsIcon()));
    		thumbViewTool.setToolTip(CaraMessages.INSTANCE.viewThumbnails());
    
    		viewToolBar.add(detailsViewTool);
    		viewToolBar.add(listViewTool);
    		viewToolBar.add(thumbViewTool);
    		viewToolBar.add(new SeparatorToolItem());
    
    		detailsViewTool.toggle(true);
    		Button excelButton = new Button(CaraMessages.INSTANCE.buttonExportToExcel(), AbstractImagePrototype.create(CaraIcons.INSTANCE
    				.formatXlsIcon()), new SelectionListener<ButtonEvent>() {
    			@Override
    			public void componentSelected(ButtonEvent ce) {
    
    			};
    		});
    		excelButton.setToolTip(CaraMessages.INSTANCE.buttonExportToExcel());
    		viewToolBar.add(excelButton);
    		// add store filter
    			TwinTriggerField<String> filterField = new TwinTriggerField<String>() {
    				@Override
    				protected void onKeyDown(FieldEvent fe) {
    					super.onKeyDown(fe);
    					if (fe.getKeyCode() == KeyCodes.KEY_ENTER) {
    						onTriggerClick(new ComponentEvent(this));
    					}
    				}
    
    				@Override
    				protected void onTriggerClick(ComponentEvent ce) {
    					super.onTriggerClick(ce);
    					filter = getValue();
    					loader.load();
    				}
    
    				@Override
    				protected void onTwinTriggerClick(ComponentEvent ce) {
    					super.onTwinTriggerClick(ce);
    					filter = null;
    					loader.load();
    				}
    
    			};
    			filterField.setTriggerStyle("x-form-search-trigger");
    			filterField.setTwinTriggerStyle("x-form-clear-trigger");
    
    			viewToolBar.add(new FillToolItem());
    			viewToolBar.add(new LabelToolItem(CaraMessages.INSTANCE.searchInFolder()));
    			viewToolBar.add(filterField);
    Any idea what could be wrong? Or how what can I do to fix that?
    Thanks in advance for any help

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

    Default

    This is hard to say without seeing the problem live. Can you please open a support ticket for this and setup access to this application so we can look at it directly?

    http://support.extjs.com/

Similar Threads

  1. toggle button - suggest
    By fother in forum Ext GWT: Discussion
    Replies: 0
    Last Post: 10 Jul 2009, 11:26 AM
  2. Toggle Button
    By ExtJsNoviceMember in forum Ext GWT: Help & Discussion (1.x)
    Replies: 4
    Last Post: 15 Jan 2009, 1:41 PM
  3. Toggle button: change button icon when pressed?
    By dbadke in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 26 Mar 2007, 7:14 AM

Posting Permissions

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