How to make a specific column be moving in the SWT table in Eclipse RCP? - swt

I have created a SWT table with 23 columns in the Eclipse RCP. The table has only Horizontal Scroll Bar. In runtime, it is obvious that the columns to the left get obstructed when we scroll to Rightward and vice-versa because our view (window) can not display all columns at once. But, I want one of the columns(say col. 2) at Left of the Table to be movable, so that it should be floating at very Left of the table when I scroll the table data Rightward at runtime.
I've tried by setting the col. property movable like :
tblData.getColumn(1).setMoveable(true);
But, it can only make the col.2 be moved (by dragging withing table header). But I wish the column be floating on the table while scrolling (to rightwards/Leftwards) other data in table.
Please, suggest me how to do this.

There is no really cool way of achieving what you want using Table. But there is an official Snippet showing how to emulate something similar here.
If you don't mind using an SWT table implementation which is not natively drawn, apparently NatTable supports "Frozen columns".
Also one of Nebula's custom table implementations might be capable to do what you want. There's Grid and XViewer.

Related

RCP - How to add a Minimize button to a cell of a GRID?

I'm working on an RCP application. It uses EMF. As per the requirement I got, i'm supposed to add a minimize and maximize button to a cell of a Grid.
Requirement:
The table includes three columns with multiple rows. The first column gives description. Since the content is big and lot many rows , it is challenging to scroll. Hence, the cell initially should show only one line of total text ending with "...", and the cell should have a minimize button and maximize button. Can any one give me understanding about the possibility of this requirement. Thanks in advance.enter image description here
The default SWT Table does not support shrinking rows. You could try it with Nattable
It is a SWT implementation of a table. It offers advanced functions such as treeview of a table.

Filemaker with Html table layout

I'm designing a form layout in FileMaker, and I'm spending a ton of time just trying to get all the controls in the right spot. Is there some way of doing a table layout? I just want to say "this control is in this cell" and let the table take care of all the formatting. Instead of having to set the position on each object just right.
What I Have
A form with a bunch of fields, organized in a table manner, i.e., rows and columns.
Example:
What I Want
To not have to specify the exact position of each individual control. Every time one element moves or needs to resize, it ends up screwing up the entire row, column, or "table", and I end up needing to move every field individually accordingly.
Is there a better way to organize fields in a form like this so that I don't have to manipulate the position and width of every "cell" in a row or column individually?
I think this is made easier with the use of the Inspector in layout mode. In particular, the controls in the "Arrange & Align" section on the "Position" tab of the inspector.
For example, you can quickly select all fields on the same "row" and align them to the top and make them the same height and width as needed.
If you are using FM 13, you may also want to make use of styles to make it easier to set the same formatting quickly across similar objects.
If you're a web developer you might want to experiment using the WebViewer. You can use Javascript for creating a nice table. Then you can interact with that table through calling a script in FileMaker.
Or just stick to a portal like Michael.Hor recommended.

Table View Group Header View

I want to create an effect similar to the Open Table application. I want the section header to stick to the top as I scroll the table. This is of course the default behavior with a plain table view, but because of style, I want a group table view.
Any ideas or suggestions?
One way to do it (I'd wager OpenTable does it this way) is to use a plain table style but dress the cells yourself as grouped. You'd need 3 background images for the cells, one for the first cell in a section (with rounded upper corners), one for the last row in a section (with rounded lower corners), and one for the others that looks like grouped cells (with left and right insets).

Nested table height auto increase?

I am trying to create a report in SSRS using Report Builder 3.0 where there is an ungrouped section of data (in the screenshot this is called "Risks") followed by a grouped section of data "Controls". There can be many controls to one risk row as seen in the row with the "Ref" 3a. After the grouped set of controls it goes back to the ungrouped risk info (see below).
screenshot
I have made this work by using a nested table inside one of the cells, this all looked fine until I added a larger amount of data in the cell "Consequences". As you can see this does not look good at the moment as the inner table does not grow.
My question, is there a way to make the inner table grow, so the 2nd row text would be in the middle of that row and the background colour would take up the whole row, so it does not leave a white space?
I really appreciate any help you can give.
Thanks,
Glenn
I do not believe this to be possible as the nested tablix is by its own right optimised for space and visual appearance.
I know what you want to do and I can only suggest you tweak yourn report to query this data in one and produce one tablix. Not ideal I know as this will mess the arrangement.

How to move all the selected element n rows down in expression blend?

Designing forms in silverlight is a PAIN.
The grid does make it easy to align stuff right or left, but when you start building more complex forms, It quickly becomes a hell.
(Think multicolumns forms, separating parts of the form in sub-usercontrol, with Localized labels so that you need the label column to be set to Auto...)
One particular problem I face is when I need to insert a new row in a form.
Is there any way to select all the
controls on multiple lines and move
them all 1 row down?
Right now, I have to go through every line and move them down, one by one.
How do you effectively build complex forms? I know about the DataForm control from the toolkit, but it is in "preview" quality and from what I have read, it is too inflexible when you need to customize and build multiple-columns forms.
Yes, complex Grid's can be annoying to change. Here are a few thoughts and ideas for you.
If you use Expression Blend and insert the Row or Column using the Blue Bars in the Artboard, Blend will attempt to do this for you. It works with varying degrees of success, largely based on the amount of the control the new row or column snap lines overlaps. For the best results, zoom into the Artboard and add the new snap line very close to the row above or column to the left.
At this point you'll still have a lot of cleanup to do, but the Grid.Row and Grid.Column properties will be correctly adjusted. Correcting the row and column sizes is one of the few times I choose to manually edit the XAML, so you'll probably be faster fixing those values manually.
If odd Margins are created (as they often are) you can select all the affected properties at once and reset the Margins en masse.
Probably the best advice would be to consider using a different control. If you find yourself constantly rearranging the contents of a Grid, perhaps you would be better off with a DockPanel. You can achieve a Grid-like result by adding elements (Grids) docked to the Top and binding the row or column height's to a Resource:
<UserControl.Resources>
<GridLength x:Key="StandardColumnHeight">32</GridLength>
</UserControl.Resources>
Now you can bind the ColumnDefinition Width to the static resource ensuring they all have the same width (of course this could also work with column widths).
<ColumnDefinition Width="{StaticResource StandardColumnHeight}"/>
If you define each of the subsequent Grid's using the same set of ColumnDefinitions (another quick XAML copy-n-paste job).
This may be a little extra work to set up initially, but inserting a new row in your DockPanel is a simple matter of XAML order and would not require as much work.