-
15 Feb 2008 9:01 AM #1
Help with floatable region
Help with floatable region
I have a border layout with both collapsible and floatable set to true for the north region. This region contains a form panel with several combo boxes.
When the north panel was "floated" by clicking its header, and I open any combo box, the panel collapses the moment the mouse hovered over the combo box data.
I tried to set autoHide=false to get around this, but now the panel collapses whenever I select an item from the ComboBox with a mouse click.
Ideally, I want to make it work such that the region will not collapse unless the mouse moves out of the region. Hovering over a opened combobox region or clicking a record in the combobox should not close it.
Appreciate any help on this.
-
25 Oct 2010 4:27 AM #2
Well, I'm having the same problem now, and looking at the date of the last request (over 2 1/2 years ago) and nothing else turning up in the forum search, it sucks that this hasn't been adressed in any way.
I'm using 3.3.0 btw...
-
25 Oct 2010 4:43 AM #3Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Try configuring your combobox with:
(only works on Ext versions that support getListParent - like Ext 3.3)Code:getListParent: function(){ return this.ownerCt.el; }
-
25 Oct 2010 4:59 AM #4
Hey, thanks Condor! That's almost what I needed - now the ComboBox doesn't flow over the container of course, but I'll just have to work around that... Thanks again!
EDIT: Wait, it does, I just had the ComboBox inside a Fieldset, which was cutting it off. Simply changing it to this.ownerCt.ownerCt.el fixed that and it's correctly flowing over the Panel. Thanks!
EDIT2: Ok, it's flowing over, but when I click on a value, the floatable region is hidden once again. I'll look into the click event of the ComboBox to get around this...
-
25 Oct 2010 5:27 AM #5
Ok, can't find a way around it closing when clicking on an element in the ComboBox. The documentation for getListParent() says this though:
"Returns the element used to house this ComboBox's pop-up list. Defaults to the document body.
A custom implementation may be provided as a configuration option if the floating list needs to be rendered to a different Element. An example might be rendering the list inside a Menu so that clicking the list does not hide the Menu"
So shouldn't it prevent it from closing?
-
25 Oct 2010 5:35 AM #6Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
A floating border layout region, when not configured with autoHide:false, will automatically slide in when the mouse is more than 0.5 sec outside the region or when a user clicks on an element outside the region.
Changing the list parent of the combobox made sure the list was inside the region instead of outside it.
I don't see why clicking on the combobox dropdown would slide in the region...
-
25 Oct 2010 5:38 AM #7
Yeah, me neither. Before it was hiding as soon as the mouse entered the ComboBox, that was fixed with getListParent(), but clicking a value slides in the region. Been looking for a way to prevent this, but haven't found anything yet...
-
25 Oct 2010 5:43 AM #8Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Could you try putting a breakpoint in the slideInIf method in ext-all-debug and see what the event target is and why it isn't inside the main element.
-
25 Oct 2010 6:29 AM #9
Ok, I've found that the issue actually lies with Saki's LovCombo extension and the ComboBox itself. So basically the solution above works for Comobboxes, trying to find the solution for the LovCombo.


Reply With Quote