wx.ComboBox hides behind other panels - combobox

I have been working with wxPython for quite a while now. I have a pretty good handle on most objects, and I've been able to create panel layouts without issue for the most part.
What I'm trying to do here is to display two lists (combo boxes.) One represents the complete list of possible options (on the left) that the user may select and add to the list on the right. The functionality works just fine, but the objects themselves visually become obscured by other panels contained within the same tab of a wxNotebook object (see red rectangle on attached image.)
The top panel is a composite of three panels. The first contains a combo box and some spacers. The second (middle) contains the buttons that allow the user to add/remove items. The third, like the first, is a combo box and some spacers. The middle panel scales fine, but I cannot adjust the height of the combo boxes.
I want the combo boxes to be the wx.CB_SIMPLE layout so that all options are displayed. Ideally, if the number of options exceeds the panel height, I would see a vertical scroll bar.
What would be the easiest way to accomplish this without losing the combo boxes behind other panels?

I don't see a need to have 3 panels nested inside of your notebook page. Instead I would create one panel with nested sizers. You can create one horizontal BoxSizer to hold all the widgets. Then inside of that, you can add the left combobox to the sizer. Next create a vertical sizer that you can put your buttons into (add, remove, clear).
Add that vertical sizer to your horizontal sizer. Now create your right combobox and add it to the horizontal sizer. Now you have the same setup or close to it and you won't have panels crossing over each other.

Related

Extjs move toolbar components to next line when they are moving out of screens

2 . I am using a toolbar which contains 6 components, which are displaying horizontally on toolbar. When am using my application in smaller screens(mobile), right-sided 2 to 3 components of toolbar are moving out of screen or browser. How can I make that these components should be moved to the next line of same toolbar, when am accessing my application in smaller screens.
One workaround for this, only if you knew how many toolbar items you could fit on a row, is to create two toolbars with this many items and have them sit alongside each other in an hbox layout. Then use the responsiveConfig to switch to a vbox layout at a narrower width, which will shift the second toolbar below the other.
Here's a quick Fiddle with an example: https://fiddle.sencha.com/#fiddle/1cot
What you want is not possible with a toolbar. A toolbar's box layout always has all items aligned in one direction (top and bottom toolbars horizontally, left and right toolbars vertically), and it is not supported to apply a different layout to a toolbar.
You can, however, equip your toolbar with arrows that allow you to scroll, or with a menu that takes all items that don't fit on the screen. The required configuration is overflowHandler:'scroller' or overflowHandler:'menu', respectively.

Codenameone list scrollbar quetions

I have a list and its scroll bar on the right along with two custom buttons representing upscroll and downscroll. These two buttons simulate scrolling by using list.setSelectedIndex(index, true) and are placed above and below my scrollbar via my custom layout.
I have two questions regarding this:
1). Since the upscroll and downscroll buttons are overlayed on top of the list, they disappear when i click elsewhere..and they kind of flash into appearance when i click the area it's supposed to be in. How can I remedy this behavior?
2). I have a scrollbar image that I have used in the "Scroll" theme in the GUI builder. It's alignment is IMAGE_ALIGNED_CENTER. However the scroll thumb doesn't reach the end of the bar when i scroll to the end of the list via my upscroll and downscroll buttons. The upscroll and downscroll buttons essentially scroll the list by one index with each press (using setSelectedIndex(index, true)).
Thanks
How do you overlay the buttons. I'm assuming you just set them into a specific location which disallowed as we can't possibly adapt them to the various resolutions. I suggest reading the developer guide section on layouts very carefully.
To place something on top of the list in a portable way you need to use the LayeredLayout or the LayeredPane and a Container + correct layout to position this within (e.g. BorderLayout EAST).
In this blog post there is a sample for making a scrollbar but it isn't "on top". It can be used as a starting point.

Calculator Layout in WPF

I have to design a calculator, but am working on the design first. The = button doesn't go into the space between the other buttons on the screen where I would like to place it. Here is a picture of what I have so far:
Uploaded with imageshack.us http://imageshack.us/a/img843/7687/unbenannt22z.jpg
I used StackPanels to create my Main Panel. How can I go about fixing this?
if you arrange your buttons in a Grid rather than a collection of StackPanels, then you'd be able to put the Equals button in the next to last row of the grid, and set its Grid.RowSpan to 2 so that it would work out as you intended.

How to re-size add/remove from list controls in window's form to provide anchoring like behavior

I want to anchor below datagridviews to top, left, right & down in a way that they don't over lap when the size of form is increased or decreased. Dock and Anchor both don't seem to provide any solution for this.
You probably need to have a TableLayoutPanel handle that. Three columns, middle column is fixed (Absolute), the outside columns would be based on percentage (50% each).
The DataGridView controls would then be dock-filled into each side column.
Or just handle the layout yourself in the form's Resize event.

Spreading controls to fill space as a dialog resizes

I have a dialog with column down the right side filled with buttons. The dialog is built with Windows Forms. I have a mockup at the following link:original dialog
(I would have included it but apparently i'm not allowed to use image tags)
I would like for the buttons in the right column to resize themselves to fill the remaining vertical space when the dialog resizes. It doesn't particularly matter to me whether or not buttons simply increase in size or whether the buttons remain the same size while the gaps between them increase. I'm simply want the buttons to go from the top to the bottom. (I have a mockup for this as well but apparenlty i can only include one link)
I've tried hosting the buttons in a FlowLayoutPanel but they do not increase as the dialog stretches, I only get whitespace at the bottom after I run out of buttons. I also tried a TableLayoutPanel and had the same result but I may have misused it. Does anyone have any ideas how I could accomplish this?
Thanks in advance,
Jeremy
To get you started. Use the TableLayoutPanel, set its Anchor property to top, bottom, left, and right. Set the rows and columns to percentages as needed. I suggest each control have it own cell. Note that each control in a "cell" can have its Dock and Anchor property set as needed.
You can do this with a TableLayoutPanel. Create a column for the buttons, with each button having it's own row / cell in the column. Set each row to be an even percentage for height (if there are 10 buttons, each row would be 10%), and dock the TableLayoutPanel to the right side of the screen. Then, put the buttons into their rows and set them to full docking. Then, when the dialog expands, the TableLayoutPanel will expand to fill the entire right side of the screen, each row will adjust proportionally, and each button would expand to fit the new row size.
You may have to adjust this a bit to fit your needs, especially in how it relates to the other content in the window.

Resources