layout

auto adjustSize()

Hi, my widget has children widgets which can appear and disappear sometimes. Now after hiding one of child I call adjustSize() to resize the main widget to possible minimum. How to automatically call adjustSize() when showing/hiding children in a layout? I tried setting sizePolicy to QSizePolicy::Minimum but this doesn't help... ...

[Android] Layout orientation changes without activity interaction

Since working with Android I'm curious about how I can let Android do everything in respect to orientation change (layout vs. layout-land). Currently I have to feed the correct number of db columns and views to the cursor adapter. Is this the correct way or do I miss something? How do you guys do that? Please have a look at the two Sim...

How to put < or > in an android button

Eclipse doesn't accept the less than symbol for the button text, is there a way to escape it so it shows on the button? <Button android:id="@+id/button_prev_line" android:text="<line" android:layout_width="wrap_content" android:layout_height="wrap_content" /> ...

Divide the width between the table elements evenly

I am trying to make a table to display something like this: ________ |__|__|__| |__|__|__| All boxes need to be split evenly, and the middle box in the bottom row will have a very large image that will be forced into a smaller size. This is my current XML layout, but I wind up with a layout like this: ________ |_|____|_| |_|____|_|...

Gallery layout problems...

Hi everyone, I'm trying to create a gallery in my Android project, but can't seem to make it work as it should. Here is what I am trying to do: Basically, I want a gallery that displays only one picture, but still has the same controls (sliding left and right). I'm getting the pictures asynchronously from the internet. Where am I at ...

Android Layout with ListView between a "top bar" and "bottom bar"

I'm trying to construct a layout where there is a text view at the top of the screen and a bottom bar at the bottom of the screen. Each of these views should stay fixed in place and in between the 2 should be a ListView. TOPBAR LISTVIEW (scrollable) BOTTOM BAR My layout (see below) almost works: the top and bottom components stay fixe...

How do I Dynamically adding a new Collapsed Panel to an Accordion in Ext?

I have an Accordion in ExtJS and I want to add new Panels to it dynamically. The Panels need to be collapsed when they appear. The code that I have now will create the Panels, but the HTML in each panel won't show. var loadoutput = new Ext.Panel({ title: 'Log', renderTo: 'logout', layout: 'accordion', defaults: { bodyStyle: 'padd...

How to get the HTML text to just stay in one place

I am making a site in HTML, and I am putting a heading on top of an object. When I shrink the window enough, the object and the text interfere Is there any way I can have the text just stay in one spot without it wrapping to the browser window if there is no space left in the browser? I have tried using fixed as a position property in ...

Magento layout module_default

I have created a module with several different controllers and therefore different pages. I want to have a default sidebar on each of my own pages but not the rest of the site. when i use the <default></default> it obviously propogates throughout the entire site. When i try <mymodule_default></mymodule_default> nothing happens. I am ...

Improving Swing layout

I have a following code : import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.Label; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax....

Having to explicitly render :layout => 'application' in controller actions in my Rails 3 app

I am having to explicitly render :layout => 'application' in my controller actions in order to get my new rails 3 app to actually use the application.html.erb layout file. Any obvious things to look for that I am doing wrong? If I don't call the :layout option it just doesn't render the layout. I get a message like: Processing by Foo...

Android: How to have a Gallery with a changable icon overlayed upon each image?

Hello, I'm a bit stuck as to the best strategy to achieve the following: I've got an array of images, which I want to display in a Gallery. I want each image to have a small icon overlayed inside it, on the bottom right hand corner (e.g. a light bulb). When the user clicks on the image or the icon, the icon will change from the 'lighb...

How to maintain aspect ratio of a rectangle as user resizes the browser

I'm using a rectangle with either with a fill from either a video or image brush. As the user resizes the browser the rectangle resizes, which is fine, except that it must keep it's 4:3 aspect ratio. How can I keep the aspect ratio constant? ...

Why Do my WPF TreeView Items Look Like This?

In learning WPF, I (perhaps unwisely) chose to display my XML data (wisely parsed with LINQ) in a TreeView. But when I load it into a TreeView, it looks like this: The XAML is as follows: <TreeView Name="StoryTree"> <TreeViewItem Name="TreeGeneral" Header="General"/> <TreeViewItem Name="TreeCharacters" Header="Characters" /> ...

How do I put an admob adview in the settings screen for a live wallpaper?

I've seen the Mario live wallpaper uses admob ads in the settings screen, but I haven't been able to do it myself. If I put the adview into the settings.xml like you would with a normal layout I get a class cast exception. Here's a screenshot of the mario live wallpaper to illustrate what I'm trying to do. ...

How to programming website with php in a modularized way?

I am developing a website that many pages share the same header/footer/sidebar/topbar. Say I have three pages: one/index.php, second/index.php, third/index.php. They all share the same header/footer/sidebar. The problem is where should I put the header/etc and its corresponding css file, since a piece of html code could not import css...

Crystal Reports: Text field flow justified around image/margin indentation

I'm creating a report that outputs a letter. The first page contains is a large left margin containing static company information. The letter output can be multiple pages, however I only want the text on the first page indented to the right away from the left margin. How can I accomplish this with one text field (the letter body is all o...

Vertically add elements to a scrollview: diffs between Java and iPhone SDK?

Folks, coming from the Java/Swing world, I am sometimes puzzled by the UI programming on the iPhone. I've spent the last hours with Googling for information but it seems that I asked the wrong questions by thinking too much in Java. Could you please point me to resources to get more familiar with the GUI concepts to be able to achive th...

How are static data and method details stored in C++

Hi, I have a very basic doubt, In C++ does there exist a data structure for each Type which stores static data and methods defined by that type, similar to the data structure that exists in .NET for every Type. Regards, Jeez ...

Programmatically resize of view depends on android version ?

Hello everyone. I am facing a weird behavior regarding the subject. I have a very simple layout containing only an empty RelativeLayout. Once I have input form the user this relative layout is filled with square tiles to achieve a mosaic-like effect. Each tile is made by a FrameLayout containing two images (only one is drawn at any gi...