gui

Qt: How do I set the QComboBox width to fit the largest item?

Hi, I have a QComboBox that I fill with QStrings using: comboBox->addItem(someString); When I start my GUI application the width of the comboBox is always 70, even if the smallest item is much larger. How can I dynamically set the width of a QComboBox, for instance, to the largest QString within the comboBox? Thanks! Edit: After so...

Java GUI JProgressBar not painting

Hello everyone, I have a GUI problem that I would like to get sorted out, but I am baffled as to what's happening and hope one of you can explain it. The code base is way too large to upload however I will explain in detail what's happening: I have a class ProgessBar which is a JDialog containing a swing JProgressBar. I have some gett...

Filtering treeview content recursively

Hi I have GUI application with gtk.Treeview component. It's model is set to gtk.Treestore, which I fill with a hierarchical structure. Everything is working fine - the treeview is what I expect it to be. Now I'd like to filter the leaf nodes to contain only a given string. I tried creating model filter like this: self.modelfilter = ...

Recommended references on GUI ergonomy

Hi mates, I have not very much experience in creating GUIs. Maybe one of the more experienced programmers/GUI-designers has some tips or references for me how to design ergonomic user interfaces. I've heard, Microsoft has a very big book on this issue for designing GUIs in Access (I assume most ergonomic issues can be used in other plat...

Windows Service with GUI monitor?

I have a C++ Win32 application that was written as a Windows GUI project, and now I'm trying to figure out to make it into a Service / GUI hybrid. I understand that a Windows Service cannot / should not have a user interface. But allow me to explain what I have so far and what I'm shooting for. WHAT I HAVE NOW is a windows application...

Java GUI threads - SwingWorker

I have a question regarding SwingWorker and Java GUI's. I have several classes which process information, we can call them Foo1, Foo2, and Foo3. This processing can take a very long time. These are all subclasses of Foo, however Foo is not called directly itself (the Foo[x] classes use methods inherited from Foo. In order to keep the...

Custom Swing look and feel vs. custom components?

I'm writing a game using Swing and want to achieve a distinctive "steampunk" inspired look for the GUI. This will require some animated components, chunky metallic borders etc. I know that I can get nice effects by overriding paintComponent and doing all of my rendering for custom lightweight components in that method. Is this the way ...

How to use designer view in Visual Studio to design more than one state of the form?

Is this a stupid question? I am trying to navigate the mystical world of C# Visual Studio. I want to be able to replace a panel at some point in run time, but the designer view only has a static view of a single state of the form. For instance there could be panel1 on the form, with button1 and picturebox1. Then, if the users presses...

Graphical Application in Windows, Linux, MacOS

I would like to build a graphical application that must work on at least Windows, Linux and MacOS. I would like to know what do you suggest I should use. I have some experience with Java and C++ but I thought about using Java Swing first. What do you think or further suggest (like maybe tools or frameworks)? I also may be needing to con...

When do I need to use dispose() on graphics?

I'm learning to draw stuff in C# and I keep seeing recommendations to use dispose(), but I don't quite understand what it does. When should I be using dispose() on a code-drawn graphic? What happens if I don't? Do I need to call it every time a graphic is not visible, such as on a GUI that has tabs and the user switched to the other t...

How to design a portable modularized GUI applications?

There are a lot of flexible, complete, cross-platform, et cetera, graphical user interface frameworks. Most of them provide many tools to turn software development easier. When building a desktop application in Qt environment, for example, one usually would have different file types, headers, implementation files, and user-interface file...

asynchronous UI in java

I'm working on a Java program, and it's been over a year since the last time I used Java, so I'm a little rusty. This program uses Runtime.exec() to call other programs to do its dirty work, and needs to parse their output and update its own GUI accordingly in real time while the other programs are working. What's the best way to do th...

Making words different colors in JTextField/JTextPane/?

I'm trying and failing to understand how to use Java's text editor components to colorize text as you insert it. I don't want or need a fully featured syntax highlighting library. Basically, I have a JTextField (or some other JText... component), and a list of words. I want any words in the field that appear in the list to be red, and t...

Custom Position of Hint in Edit Text box.

Hello, I was wondering if there was any way that I could get a hint at the bottom of an Edit Text view -- and then the user to start entering text at the top of the box. As a bonus question, is there any way I can make the hint NOT disappear once the user starts entering text. Let me know if you don't understand my question and I w...

increasing the page width in oracle reports builder

Hi, I am designing a new report using oracle reports builder that comes with 10g. I have many columns to be inserted horizontally. But I couldn't increase the page width of the body section beyond 8.5 inches. But I can see the page width of some existing reports to be more than 16 inches. How do I increase the page width?. I have been go...

What is the best way to create mapping from SQL database to GUI?

I think its quite usual task, but still solutions I saw look not so nice. For example in Qt used approach based on MVC pattern -- you must assign all connections manually. Or I remember one PHP engine where pages were creating from DB schema. Which are other approaches? Which one you are prefer? What are the best practices? ...

Rails: UI to add children from large record set to parent model in HABTM relationship

Given the parent / child HABTM relationship: class List < ActiveRecord::Base has_and_belongs_to_many :items end class Item < ActiveRecord::Base has_and_belongs_to_many :lists end I need to set up a UI to add Items (children) to a List (parent) from the List create / edit form. The wrinkle is that there are far too many Items reco...

.net winforms GUI pattern for blotter

I have to design a .Net winforms GUI which has around 10 tabs - each of which display a blotter grid. The rows correspond to records in cache and the cache data changes frequently. The amount of data is large and the requirement is that only those grid cells should be updated for which the corresponding data has changed in the cache. Is...

How to make WPF Grid expandable?

Please, let's focus on the horizontal size (width). I have horizontal StackPanel which auto-resizes to occupy entires space (it "expands"). Within it I have Grid (with 3 columns) and a scrollbar. The scrollbar width should be fixed, but Grid should expand. How can I force it to do it? Current code: <StackPanel Orientation="Horizontal"...

SWT table: auto resize all columns

Qt solution is a single call to resizeColumnsToContent(), in .NET one can use TextRenderer.MeasureText(), JTable could use AUTO_RESIZE_ALL_COLUMNS. In SWT, is there a way to programmaticaly resize columns after populating them? Calling computeSize(SWT.DEFAULT, SWT.DEFAULT) returns the same value thus disregarding character left over...