layout

java swing - layout oddness when using different layout managers

Bit of oddness, seen if I do the following: import javax.swing.*; public class FunkyButtonLayout { public static void main(String[] args) { JFrame frame = new JFrame(""); JPanel j0 = new JPanel(); // j0 gets added to the root pane j0.setLayout(null); JPanel j1 = new JPanel(); // j1 gets added ...

WPF: How do I transition from one docked UserControl to another?

I have quite a basic WPF form with a DockPanel, there's a Menu bar, a Status bar, and a UserControl. Like so: <DockPanel> <Menu DockPanel.Dock="Top"> ... </Menu> <StatusBar DockPanel.Dock="Bottom"> ... </StatusBar> <UserControls:MyUserControl /> <DockPanel> My problem is: Based on an event, I want to transition the U...

Dynamic WinForm aka questionnaire

I am in the process of converting a ASP.Net Web App to a C# WinForm App. I am struggling converting a specific page. This page is a questionnaire where each answer(usually rdo) determines what the next question will be. I originally had thought to just have all questions displayed and set the read-only property accordingly. Unfortu...

WPF Design question

Lets say i am developing a chat, first you come to a login window and when your logged in i want to use the same window but chaning the control :P how would be the best way to desight this? is there any good way to implement this what root element should i use? Thanks a lot!! ...

Fix layout via css

I've got a layout bug that shows up in IE6, and I'm trying to come up with a way to give some clues to this content in our content area so that it won't drop down below the navigation menu. Sadly, while this would probably be relatively easy to fix if I could redesign the whole page, I can't do that...it's a live site that hosts many, ma...

Why would you choose a fixed-width design?

Update: I deleted my motivation because it seems to distract readers. This is not about "why don't you make your window smaller". See the screenshots and you will see obstructed text because of fixed width. See my reference to "em/ex" notation in CSS. I would like to have a real discussion here. Thank you. Now I would like to ask real...

IE will display this in 2 rows, but I want it displayed in one line

I have the following code: <div id="banner"> <a href="http://www.kiubbo.com"&gt;&lt;img src="/Logot.png" border=0></a> <script type="text/javascript"><!-- google_ad_client = "pub-xxxxx"; /* 468x60, creado 13/02/09 */ google_ad_slot = "7830464607"; google_ad_width = 468; google_ad_height = 60; //-...

Line-breaking widget layout for Android

I'm trying to create an activity that presents some data to the user. The data is such that it can be divided into 'words', each being a widget, and sequence of 'words' would form the data ('sentence'?), the ViewGroup widget containing the words. As space required for all 'words' in a 'sentence' would exceed the available horizontal spac...

Layout a HTML list in evenly-spaced columns

I'd like to lay out a list such as the following in 2/3 evenly spaced columns <ul> <li>one<li> <li>two<li> <li>three<li> <li>four<li> <li>five<li> <li>six<li> <li>seven<li> <li>eight<li> <li>nine<li> </ul> One solution is to separate the list into two lists and float one of them right, possibly with a margin, e.g. ...

Overlay two controls

Hi, I started to make some thing in WPF and I have a question. I think the answer might be easy and even obvious, but somehow... I have two controls on a form enclosed by a grid. I want two position the second control above the first one (it's transparent). Coming from WinForms development that isn't that hard, so it won't be in WPF. B...

WPF textboxes are too big!

I have a WPF page with some data entry TextBoxes on it and they look much bigger than the font needs. What determines the height of the textbox? is there a way to squish them up? The textbox gets bigger and smaller according to the font size it displays (so I don't want to set the height property directly if I can help it. Thanks ...

How do I programmatically control the size of a child view in an Android AbsoluteLayout

The documentation at http://code.google.com/android/reference/android/widget/AbsoluteLayout.html says: onLayout(boolean changed, int l, int t, int r, int b) //Called from layout when this view should assign a size and position to each of its children. So I overrode it like this: @Override protected void onLayout(boolean changed, int ...

Webform Layout Question. Table or something else

Hi all, I have to create a webform that looks something like this column column - column column column column - column column label: input - label: input label: input - label: input - label: input label: input - label: input label: input label: input - label: input label: input ...

Layout options in UITableView (iPhone)? Or extend UIScrollView?

Hi, I'm new to Objective-C and iPhone coding and was hoping someone could help me. Basically I want a scrollable table that displays a name and a quantity of that item. For example: Apples.........2 Oranges......4 Bananas......5 I want the name to be left-justified and the number to be right-justified. Is there any way to do this w...

How to avoid Winforms radio button container auto grouping

The background In .Net windows forms (2.0) radio buttons are automatically grouped by their container control, whether it is a Form, Panel or GroupBox. That means that when you select one radio button, every other radio button in the same container is automatically changed to unchecked state. Now, consider the following form layout: ...

Absolutely centered content inside a WPF layout panel

I need to find a way of absolutely centering the content of a LayoutPanel in WPF. I have two textblock elements which must render at the vertical and horizontal center of the panel without relying on absolute heights and widths. This is something i can do quite easily with a single element since any ContentControl can have it's verti...

CSS Layout 2-Column fixed-fluid

Hello everyone, I was wondering if anyone here had a fairly simple tutorial for the following 2 column css layout. A left fixed column and a fluid content column, with a header and footer and equal column heights. Thanks in advance ...

How to make a form resize vertically and horizontally when a control grows?

(WinForms .net 2.0) I'm making a form which, much like the standard MessageBox, has a single label on it and should grow horizontally and vertically if the text on the label grows. Horizontal seems easy enough, by setting AutoSize = true on the label and the form. However, I also want to make the label grow vertically, ie if it has newl...

Is it possible to have a web browser scroll to show CSS fixed position items that are outside the viewport of the web browser?

I am trying to create a CSS layout where the page looks like it's in the middle of the forest. There is a left and right div with the background trees, some header divs that show the top of the page with various wildlife, and some footer divs that show the bottom with more wildlife that matches up with the left and right div background ...

FireFox Flex Layout/Rendering Issue

The Flex Application is set to 900 pixels width. The object tag is set to 900 pixels width. Firefox is rendering the object at 110% the size requested. So there is a blank vertical column on the right size of the object. (It does this if I set fixed height also) If I set the width in the object tag to 810, then they match up, but thats...