layout

Is there a better layout language than HTML for printing?

I'm using Python and Qt 4.4 and I have to print some pages. Initially I thought I'd use HTML with CSS to produce those pages. But HTML has some limitations. Now the question is: is there anything that's better than HTML but just (or almost) as easy to use? Additionally, it should be GPL-compatible. Edit: kdgregory & Mark G: The most o...

Fluid layout of text in Flex3

In my Flex3 app I have some floating windows which contain variable amounts of text. The windows are meant to be user-resizable. Currently, while I can resize the windows OK, I can't get the text in a TextArea in the window to re-flow when the window is resized. I've come across blog postings that there's a size bug in TextArea that mean...

Trimming Mako output

I really like the Mako templating system that's used in Pylons and a couple other Python frameworks, and my only complaint is how much WS leaks through even a simple inheritance scheme. Is there anyway to accomplish below, without creating such huge WS gaps... or packing my code in like I started to do with base.mako? Otherwise to get ...

What can't be done in CSS yet?

A while ago I was trying to figure out a way of doing this without using a table layout: <table> <tr><td rowspan="2">Left column</td></tr> <tr><td>Right Top</td><td>Right bottom</td></tr> </table> Eventually I gave up and decided that it's impossible to do without tables (okay, CSS 3 might be able to, but waiting another 5-10 year...

WPF Layout: word-wrapping not working

Why does the text in my TextBlock extend out to the right beyond my canvas even though I specified word wrap? <Window x:Class="WpfApplication6.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" SizeToContent="WidthAndHeight"> <...

How to make clickable color areas with rounded corners in WPF, Button or Border/Textarea?

I want to have four colored areas which are clickable. I can user TextBlock in a Border to get the color areas, but then neither of them have a Click event. So I can make the whole thing a button, but then it doesn't have rounded corners and I can't seem to change the background. What is the recommended way to go about this, here is wha...

CSS floats and block elements

I have an annoying CSS layout problem. I'm trying to float images on a particular page: img { float: left; } I think make sure my headings don't start indented with: h3 { clear: left; } It all works fine except for some of the images that have lists (or any block element) floating past them (or not as the case is). The reason...

Using RenderTransform to increase the size of a DataTemplate in WPF

I'm using a DataTemplate that animates a RenderTransform to increase its size when the mouse is over it. The problem I'm having is that when the animation is in effect the enlarged list box item appears behind other items. Is there a way to control the ZIndex of the list box item from within my DataTemplate so that it's always on top of ...

Prefuse Toolkit: dynamically adding nodes and edges

Does anyone have experience with the prefuse graph toolkit? Is it possible to change an already displayed graph, ie. add/remove nodes and/or edges, and have the display correctly adapt? For instance, prefuse comes with an example that visualizes a network of friends: http://prefuse.org/doc/manual/introduction/example/Example.java ...

Best Layout of a WinForms UserControl with both Static and Dynamic Content?

I have a user control that has: a) a buttons panel at the top (it always has to be visible) b) a panel with controls that are dynamically added and re-sized at run-time. The controls can be many, so the panel has to be scrollable. This user control will be hosted in a form, with the following requirements: a) The initial size of the for...

Does IE7 have a problem with some CSS attribute selectors?

I am trying to style some form labels by selecting them with their 'for' attribute. But nothing is being picked up when I preview it in IE7. I'm doing this because I'd like to style them differently to each other, without adding to the existing markup. So if my css looks like the following, I get nothing: <style> label[for="foo"] { ...

How can you measure the space that a text will take in Javascript?

In Javascript, I have a certain string, and I would like to somehow measure how much space (in pixels) it will take within a certain element. Basically what I have is an element that will float above everything else (like a tooltip), and I need to set its width manually through Javascript, so it will adjust to the text inside. I can't h...

Show/Hide details WinForm

I am creating a WinForm App(.net3.5) where I display some Client Details. My issue is that we have a directions field that correlates to an Address. To save room I would like to have the directions hidden until the user "wishes" to see them. My intended method was to have an "accordion" like presentation for the directions. I would im...

XY Layout JAVA

Hi, is there any sort of XY-Layout to Java? So I can set a Button at the X and Y cordinate and that it is suppose to be that big etc.... Because this border layout and grid and panel thing is driven me crazy. :) They are flowing every were and getting strecht up. And to make them small you have to put panel in panel in panel in panel...

Can you do this HTML layout without using tables?

Ok, I had a simple layout problem a week or two ago. Namely sections of a page needed a header: +---------------------------------------------------------+ | Title Button | +---------------------------------------------------------+ Pretty simple stuff. Thing is table hatred seems to have t...

How do I layout a 3 pane window using wxPython?

I am trying to find a simple way to layout a 3 pane window using wxPython. I want to have a tree list in the left pane, then have a right pane that is split into two - with an edit component in the top part and a grid component in the bottom part. Something along the lines of: -------------------------------------- | | ...

How to deploy a Python application with libraries as source with no further dependencies?

Background: I have a small Python application that makes life for developers releasing software in our company a bit easier. I build an executable for Windows using py2exe. The application as well as the binary are checked into Subversion. Distribution happens by people just checking out the directory from SVN. The program has about 6 di...

How to size Android components according to image size using XML

Hi I have created a custom icon bar in Android using the XML layout creator, using a RadioGroup within a LinearLayout (XML included below). Each RadioButton within the RadioGroup has a custom drawable (with checked and unchecked states) as its android:button attribute. The Linear layout is itself within a RelativeLayout so that it c...

How would you justify text in Silverlight?

Does anyone have any suggestions on how to justify read-only text (rendered into a TextBlock) in Silverlight 2? WPF supports text justification by way of the TextAlignment enumeration: public enum TextAlignment { Left, Right, Center, Justify // <--- Missing from Silverlight :( } However, Silverlight 2 only supports the...

WPF Grid Column MaxWidth not enforced

This problem stems from not being able to get my TextBlock to wrap. Basically as a last-ditch attempt I am setting MaxWidth on my container grid's columns. I was surprised to find that my child label and textbox still do whatever they want (bad children, BAD) and are not limited by my grid column's MaxWidth="200". What I'm really tryi...