Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3061 > unrolled thread
| Started by | "Mark" <mark@THRWHITE.remove-dii-this> |
|---|---|
| First post | 2011-04-27 15:42 +0000 |
| Last post | 2011-04-27 15:42 +0000 |
| Articles | 4 — 2 participants |
Back to article view | Back to comp.lang.java.gui
Setting uniform width of "Mark" <mark@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
Re: Setting uniform width "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
Re: Setting uniform width "Mark" <mark@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
Re: Setting uniform width "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
| From | "Mark" <mark@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:42 +0000 |
| Subject | Setting uniform width of |
| Message-ID | <fnal11$lh0$1@news.nems.noaa.gov> |
To: comp.lang.java.gui
I'm baffled as to how to set column widths to be a size I want (using
SWT/Jface).
My code is basically this:
tv = new TableViewer(parent,SWT.FULL_SELECTION);
-snip-
table = tv.getTable();
-snip-
tc1 = new TableColumn(table,SWT.CENTER);
tc1.setText("Col 1");
tc1.setWidth(150);
tc2 = new TableColumn(table,SWT.CENTER);
tc2.setText("Col 2");
tc2.setWidth(150);
-snip-
But the setWidth(150) seems to be ignored (on my RHEL4 box), and the
table appears with its own idea of what the widths should be (which is
not uniform). I've seen the use of setWidth() in other sample Java
code, and I've set mine up the same way, but it doesn't work. What am I
doing wrong? The bottom line is that I want all my columns in the table
to be same width, so maybe setWidth() is not the ideal way of
accomplishing this...
Your thoughts?
Mark
---
* Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [next] | [standalone]
| From | "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:42 +0000 |
| Subject | Re: Setting uniform width |
| Message-ID | <cinhp392jdvlq3m0afrc13ggom7r2i7hdf@4ax.com> |
| In reply to | #3061 |
To: comp.lang.java.gui On Thu, 24 Jan 2008 13:22:25 -0500, Mark <Mark.Fenbers@noaa.gov> wrote, quoted or indirectly quoted someone who said : >But the setWidth(150) seems to be ignored (on my RHEL4 box), There are 3 width-setting methods, min, max and preferred. -- Roedy Green, Canadian Mind Products The Java Glossary, http://mindprod.com --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [next] | [standalone]
| From | "Mark" <mark@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:42 +0000 |
| Subject | Re: Setting uniform width |
| Message-ID | <4798EDF5.7000100@noaa.gov> |
| In reply to | #3063 |
To: Roedy Green While true with Swing, this does not apply using SWT/JFace. Thanks, though. Does anyone else have any clues how this can be done? Mark Roedy Green wrote: > On Thu, 24 Jan 2008 13:22:25 -0500, Mark <Mark.Fenbers@noaa.gov> > wrote, quoted or indirectly quoted someone who said : > >> But the setWidth(150) seems to be ignored (on my RHEL4 box), > > There are 3 width-setting methods, min, max and preferred. --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [next] | [standalone]
| From | "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:42 +0000 |
| Subject | Re: Setting uniform width |
| Message-ID | <oknhp3pb3cfafopsb2q6onbqv99cvpshu5@4ax.com> |
| In reply to | #3061 |
To: comp.lang.java.gui On Thu, 24 Jan 2008 13:22:25 -0500, Mark <Mark.Fenbers@noaa.gov> wrote, quoted or indirectly quoted someone who said : >But the setWidth(150) seems to be ignored (on my RHEL4 box), see http://mindprod.com/jgloss/jtable.html -- Roedy Green, Canadian Mind Products The Java Glossary, http://mindprod.com --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.gui
csiph-web