layout

Question about using adaptive layout + print style sheet

Hey everyone, In my web design class, we looked at creating different style sheets for different window sizes and using a javascript that detects the window size and loads the right style sheet. In the head, I'm linking to three external style sheets, as well as a link to the javascript file. So the adaptive layout works fine. However....

Simulating click with javascript on document

Is it possible to simulate a click on a webpage using javascript but without defining a specific element, but rather just specifying the document? I would have liked to do something like this, and if the location happens to have a link, then this will be pressed: function simulateClick(x, y) { var evt = window.createEvent("MouseEv...

Android: Dynamically add custom checkboxes to a tableLayout

What should I do to use custom checkboxes if I add my checkboxes dynamically in my code? (On the java code not on the XML files.) I'm following this tutorial, but using it I can't achieve my goal. For example, I have a tableLayout and I want to add a checkbox for each new row I have. Thank you all. ...

android linear layout solution

hi what i'm trying to achieve is #1 but what i get is #2 http://s48.radikal.ru/i120/1005/ff/6e439e04bbc8.jpg it seems linear layout stacks with height of it's first element and shrinks second's element height to that. the xml for those is the following: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://sc...

Best practice for viewflipper containing 10 linearlayouts?

I'm embarking on a GUI Activity composed of a viewflipper, which I would like to contain 10 linearlayout layouts. Is it advisable to put all of my layouts into the same XML resource/layout file? If not, is there a more organized approach to coding a viewflipper with many layouts? Will having everything in the same file come at a sig...

Creating GUI for Bantumi game

I've written backend for simple Bantumi game. Now I'd like to create a simple GUI for it, so that it would look like this : How to start ? What layout should I use, and what type of component each element should be? Classes : Basket Player Game Main Shared ...

How can I control the width of JTextFields in Java Swing?

I am trying to have several JTextFields on a single row, but I don't want them to have the same width. How can I control the width and make some of them wider than others? I want that they together take up 100% of the total width, so it would be good if I could use some kind of weigthing. I have tried with .setColumns() but it doesn't m...

WinForms: Making a set of controls scale vertically.

I have a Windows Form that displays several DataGridViews in the following layout: (No access to image hosting at work, so please pardon the ASCII art...) ┌─────────────────────────────────────────┐ │┌───────────┐┌──────────────────────────┐│ ││ ││ ││ │└───────────┘│ ││ |...

GWT 2.0 Visual Layout Tools?

Are there any tools that would assist us less artistic types in GWT 2.0 layout that use GWTxl? I'm fairly CSS impaired and would like to see how my changes look "on the fly". ...

Simple 2 column CSS layout with nested divs

Hello, I have good familiarity with CSS but for some reason I am unable to achieve the result I want in this case. Here is the link to my test site http://danberinger.com/test.html Keep in mind that I want a 2 column layout and that the background wrapper color (gray) is not showing. Instead the body background color image is being...

How to test a call to setContentView?

How do I write a unit test to determine that the layout used in setContentView(int layoutId) has been called and corresponds to the proper layout for a given activity? ...

Problem using FormLayout in Swing

Hi I am using the FormLayout. I just discovered it and it's powerful layout manager. I would like to layout 4 components (outlined, properties, tgraph, library) in 3 columns. I want to layout my library component on top of the outlined component in one column, the graph and the properties component in one column. But it doesn't work. M...

Best way to layout in HTML forms?

I want to display an HTML form containing labelled text fields, like this: First Name: [_____________] Last Name: [_____________] Date of Birth: [________] My obvious approach is to use a <TABLE> and simply place the labels and text fields in its cells, but is there a better way, e.g. a CSS-based approach? EDIT:...

Balanced text wrapping in HTML

In HTML, is there a way to evenly distribute text that is broken across multiple lines? E.g., I don't want: Here is some really long label that ends up on two lines. I'd prefer: Here is some really long label that ends up on two lines. ...

How can I force a ListView with a custom panel to re-measure when the ListView width goes below the width of the previous measurement?

Sorry for the long winded question (I'm including background here). If you just want the question, go to the end. I have a ListView with a custom Panel implementation that I'm using to implement something similar to a WrapPanel, but not quite. I'm overriding the MeasureOverride and ArrangeOverride methods in the custom panel. If I do...

Variable width columns in a table

I'm using an HTML table for a calendar and I want to fill the cells with various events from my database. Usually they will land on weekends but some will run for long weekend, bank holidays or even the odd week day. How can I get my tables columns to expand and shrink accordingly. I'd like to avoid the use of javascript if possible. ...

Android layout issue - relative widths in percent using weight

I am trying to assign relative widths to columns in a ListView that is in a TabHost, using layout_weight as suggested here: <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_paren...

Input Search Layout Broken in IE6 and input img src not displaying

Yes, another stupid IE6 problem. Unfortunately i cannot turn a blind-eye to this one. The input button is not showing up in IE6 but is working in all other browsers and the layout is breaking as well. Any advice would be greatly greatly appreciated to see the problem online - please visit: http://chickenofthesea.com/company.aspx - ag...

Best way to create 100% width middle column with css

Hey everyone, I have a pretty standard css layout where I use a container div that is 980px wide to hold everything. The only problem is that I want to have a 1900px wide banner half way down the page that is centered in the middle and is 100% width of the page. Is there any way to do this without getting rid of the container div? so I...

How can I make a custom layout / change header background color … with Tex, Latex, ConTeXt ?

Hi, currently I produce dynamically this document http://download.stephane-klein.info/exemple_document.png with Python Report Labs… to produce pdf documents. Now, I would like try to produce this document with Tex / Latex / ConTeXt… I've some questions : how can I make the layout ? how can I make header background color ? how can I ...