Home » Eclipse Projects » Rich Client Platform (RCP) » Problem with Table(Viewer) in Forms(How to handle table (viewer) in an eclipse form page/view)
Problem with Table(Viewer) in Forms [message #641964] |
Mon, 29 November 2010 11:52 |
Dirk Alexander Schaefer Messages: 12 Registered: July 2009 |
Junior Member |
|
|
hello,
i'm trying to develop a rcp application. in that application i've got a 'navigation' view on the left side while the most space is on the right side, the editor area.
in the navigation view i'm working with a form. in that form i would like to put three "rows" of different widgets.
1. a section with elements to define filter data.
2. a textField to input a search string.
3. a table listing all the entities available for editing.
i got row 1 and 2 working but i'm having problems with row 3. also the table is shown it does not look and behave the way i want it to do. i would like to have it:
1. exactlly be as high as the space left (minus the two upper rows) in the form's parent view including refreshing/redrawing when the size changes due to window resizing by the user.
2. be as width as the view is including resizing when the user makes the view wider or smaller.
3. show a vertical scrollbar in the table widget if there are more items in the table than can be shown currently.
4. show a horizontal scrollbar in the table if the text of one or more items is longer than the table's parent view's widht. or even better, cut the text followed by three dots or somthing like that.
5. draw the table that way that the whole line is selected when an item gets selected, not only the item it self.
up to now i got it to be shown but it is only as width as it needs in order to show the items and if i put an item into it whose text is longer than the view containing the formTable, the table is wider and the parent view shows a horizontal scrollbar. if i then add an item programmatically, the table starts showing a vertical scrollbar.
[Updated on: Mon, 29 November 2010 11:56] Report message to a moderator
|
|
| |
Re: Problem with Table(Viewer) in Forms [message #643067 is a reply to message #641964] |
Fri, 03 December 2010 21:09 |
Dirk Alexander Schaefer Messages: 12 Registered: July 2009 |
Junior Member |
|
|
hi wim,
no, unfortunately not.i already thought that no one will understand my description... i give it another try.
i'm developing a rcp application. in that application i use a common layout where about 20% of the window on the left side is used for navigating through a list of entities hence called the navView, let's say person objects. the rest of the window is reserved for the editor space.
if i place an ordinary table in the navView i got it managed to have it behave in the way that the table fills all the available space of the view it is placed in, the parent. if i resize the view, the table gets resized, too. if the view is not wide enough to show the whole lines in the table, the table rows' text get cut with three dots at the end. vertically the table does not exceed the available visible area of the view and a scroll bar is being shown thus i can scroll through the list. all in all exactly as i want it to behave.
i then added a further view on the left side. this time i placed a form in the view as i want to have three "parts" to be shown stacked vertically. at the top a section which contains controls to define filters for the list of persons. below that section a line with a textField and a button to enter search strings. the rest of the visible area i would like to fill with a table that behaves the same way as the table i placed directly into the other view. but what ever i do, what ever layout i use i do not get it behave the way the other table does. the table always flows over the visible area in the background horizontally and vertically. furthermore the table does not show a scrollbar until i add another row programmatically. the only thing that gets a scrollbar is the form if i use a ScrolledFrom. but if i use a scrolled form the whole content of the parent view gets scrolled, not just the table content.
i hope i explained it a bit more comprehensible this time...
any idea on how to get this problem solved?
thx a lot,
gree,
dirk
[Updated on: Fri, 03 December 2010 21:12] Report message to a moderator
|
|
|
Re: Re: Problem with Table(Viewer) in Forms [message #643121 is a reply to message #643067] |
Sat, 04 December 2010 19:28 |
Wim Jongman Messages: 423 Registered: July 2009 |
Senior Member |
|
|
Hi Dirk,
Can you put a screenshot on the web somewhere and place the link here.
--
Best Regards,
Wim Jongman
> hi wim,
>
> no, unfortunately not.i already thought that no one will understand my
description... ;) i give it another try.
>
> i'm developing a rcp application. in that application i use a common layout
where about 20% of the window on the left side is used for navigating through
a list of entities hence called the navView, let's say person objects. the
rest of the window is reserved for the editor space.
>
> if i place an ordinary table in the navView i got managed to have it behave
in the way that the table fills all the available space of the view it is
placed in, the parent. if i resize the view, the table gets resized, too. if
the view is not wide enough to show the whole lines in the table, the table
rows' text get cut with three dots at the end. vertivally the table does not
exceed the available visible area of the view and a scroll bar is being shown
thus i can scroll through the list. all in all exactly as i want it to
behave.
>
> i than added a further view on the left side. this time i placed a form in
the view as i want to have three "parts" to be shown stacked vertically. at
the top a section which contains controls to define filters for the list of
persons. below that section a line with a textField and a button to enter
search strings. the rest of the visible area i would like to fill with a
table that behaves the same way as the table i placed directly into the other
view. but what ever i do, what ever layout i use i do not get it behave the
way the other table does. the table always flows over the visible area in the
background horizontally and vertically. furthermore the table does not show a
scrollbar until i add another row programmatically. the only thing that gets
a scrollbar is the form if i use a ScrolledFrom. but if i use a scrolled form
the whole content of the parent view gets scrolled, not just the table
content.
>
> i hope i explained it a bit more comprehensible this time... ;)
>
> any idea on how to get this problem solved?
>
> thx a lot,
> gree,
>
> dirk
|
|
| | | | | |
Re: Problem with Table(Viewer) in Forms [message #643928 is a reply to message #641964] |
Wed, 08 December 2010 17:43 |
Dirk Alexander Schaefer Messages: 12 Registered: July 2009 |
Junior Member |
|
|
hi all,
meanwhile i managed to get it working as i want it to do. thank you very much, wim. the tool you suggessted is great. i think i will not create views in any other way anymore for a long time...
for those who are interested: in set a FillLayout in the parent composite passed to the public void createPartControl(Composite parent) method. i then added a composite to that parent having a GridLayout set which is the container for all the "viewParts". i added one composite to that "containerComposite" which is the parent of the table and i set a TableColumnLayout for that composite.
by doing it that way, things are working now.
thank you all very much for your help!
greez,
dirk
[Updated on: Wed, 08 December 2010 17:47] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu Sep 26 03:12:14 GMT 2024
Powered by FUDForum. Page generated in 0.04762 seconds
|