Another newbie question:
I built a ShellWindow with a ComboBox inside a ContainerView and it seems like the pulldown is clipped or restricted in size by the container. I already brough menu and Container to Front and checked droppedHeight property (it is 200). Does this mean that ComboBoxes do not work in Containers? Ciao ...Jochen |
Jochen,
> I built a ShellWindow with a ComboBox inside a ContainerView and it seems > like the pulldown is clipped or restricted in size by the container. I > already brough menu and Container to Front and checked droppedHeight > property (it is 200). > Does this mean that ComboBoxes do not work in Containers? They work OK on this machine using XP and Dolphin XP. Have a look at the small (28K) screenshot file I've uploaded to my web site at http://www.idb.me.uk/test.jpg I wasn't sure exactly what you mean, your references to menu and combo box confused me a bit, so I've done both. The left screenshot just shows a shell with a grey container containing a combo box. The combo box is dropped and extends out of the container and the shell. The right one shows a combo box menu dropped and extending outside of the container and shell. Mail me if you want a copy of the package that produced it. Regards Ian |
> They work OK on this machine using XP and Dolphin XP. Have a look at the
> small (28K) screenshot file I've uploaded to my web site at Hm... the difference is probably that I have a BorderedLayout for the shell and the container is north-aligned. The container itself has a BorderLayout, too and the combo-pulldown is center-aligned. In your example, no Layout is used, so no adjustment of the lid out conponents will probably take place. To me it looks like the layout manager resizes not only the combo but also the pulldown menu to lie inside the calculated area.. It would be great if you could set up the above scenario and try again. Ciao ...Jochen |
it is definitely the layout, I just set the alignment of the combo to none
(nil) and it works. Setting it back to center it fails again. Any idea if using layouts with combos is somehow possible? Ciao ...Jochen |
In reply to this post by Jochen Riekhof
Jochen,
I'm not just trying to be argumentative here but .... it works for me :-) See http://www.idb.me.uk/test1.jpg I - - Created a Shell and set it's LayoutManager to BorderLayout and it's preferredExtent to: 200@200 - Added a Presenter.Default view, set it's arrangement to North , it's LayoutManager to BorderLayout, it's backcolor to grey and it's extent to 200@100 - Added a ListPresenter.Combo box to the container, set it's arrangement to Centre and gave it a name. The left screenshot shows the normal shell and the right shows the combo box dropped. FWIW, I tend to only use BorderLayout for main Shells that have a Toolbar (north), a StatusBar (south) and a Container (centre) that contains everything else. For most general purpose layouts I would recommend using FramingLayout. It's a bit more work but it does, in my experience, mean you end up with a layouit that usiually works as you intended it too. Regards Ian |
In case it helps I've also uploaded the Dolphin XP package that produced the
example http://www.idb.me.uk/test.zip Ian |
> http://www.idb.me.uk/test.zip
Thanks for your package! Got it now. Please put a PushButton inside the Container's Borderlayout with e.g. east alignment (so that you have the combo along the top and the button beside it in the top right corner) and now the pulldown menu is clipped.- Took me a while to figure it out. Very weird?! Ciao ...Jochen |
Jochen,
I'm with you now - I can see the bug.... The package I posted the link to works as expected if you open the Test shell and just drop down the combo box.... It still works if you change the vertical size of the shell by dragging the border.... But it fails, the combo list starts clipping at the edge of the container, if you change the horizontal size of the shell by dragging the border. It looks like there may be a problem with the resize event handing and/or BorderLayout manager. Sorry it took so long to catch up with you :-) Regards Ian |
> It looks like there may be a problem with the resize event handing and/or
> BorderLayout manager. Yes. I found it also interesting, that it works again if I set EITHER the containers OR the combobox alignment to none. This looks like the nesting of BorderLayouts confuses someone. I followed your suggestions and use FramingLayout now, which seems to work. Thank you for the tip! Do you think the bug is in dolphin or rather in Windows? Ciao ...jochen |
Jochen,
> Do you think the bug is in dolphin or rather in Windows? I don't think it's anything to do with Windows. That is displaying the ComboBox withn the area it has been told to (as the scroll bar shows). I would guess that it's caused by BorderLayout not expecting to have to handle subviews that might extend outside of the enclosing container. It's just not a situation in which a BorderLayout would normally be used and is probably not allowed for in the layout code. BTW. Although I said earlier that I don't often use BorderLayout there is one other situation (in addition to the Toolbar/Statusbar layout) where it is useful. If you want to centre a single subview within a shell or container, so it fills the whole view, then using a BorderLayout and "Centre" arrangement is the quickest way. Regards Ian |
> It's just not a situation in which a BorderLayout would normally be used
and is > probably not allowed for in the layout code. Hum, coming from the Java world I can say that about 90% of the code I've seen uses BorderLayout in this situation (centered width-scaled item with button next to it). Ciao ...Jochen |
Jochen,
> Hum, coming from the Java world I can say that about 90% of the code I've > seen uses BorderLayout in this situation (centered width-scaled item with > button next to it). That just means that Java's BorderLayout is not the same beast as Dolphins, even though it has the same name. I've never been contaminated by Java so I don't know how different the two implementations are. As I mentioned before, FramingLayout is probably the best general purpose LayoutManager to use in Dolphin. Regards Ian |
Ian...
> That just means that Java's BorderLayout is not the same beast as Dolphins, > even though it has the same name. I've never been contaminated by Java so I > don't know how different the two implementations are. Nope, I think it is supposed to do exactly the same, and even has the exact same two properties (hgap, vgap and possible alignments). > As I mentioned before, FramingLayout is probably the best general purpose LayoutManager to use in Dolphin. Yep, I use it now. However, I believe that no layout manager should ever touch the popup size, so I still consider the current behaviour a bug :-). Ciao ...Jochen |
Free forum by Nabble | Edit this page |