How to change the column width/ratio in Flexible Column Layout? - sapui5

The predefined ratios of sap.f.LayoutType for two columns in Flexible Column Layout are
67/33/- TwoColumnsBeginExpanded
33/67/- TwoColumnsMidExpanded
Is there a way to change the ratio/width of the columns?

I wanted to have a 50%/50% ratio, but it seems not possible according to Documentation
Although the FlexibleColumnLayout can display 2 or 3 pages at one
time, they can never have equal width (50%/50% or 33%/33%/33%). One of
the pages is always larger (expanded) or even takes up the full width
of the control (fullscreen). This is intentional because users should
have a clear indication of what to focus their attention on at any
given moment, for example, a list of items, one particular item, one
item’s details.
Now I'm using sap.ui.layout.ResponsiveSplitter instead.

Related

Is there a way to limit default column width?

In Oracle SQL Developer selecting VARCHAR2, CLOB or LONG columns shows all its contents by default. Is there a way to limit this default to e.g. 20 characters, or at least not allowing columns to be bigger than the screen width?
I know I can use Auto-fit all columns → on Header, but it limits the size of columns usually too much. However, it is still easier to expand a small column, than to contract one that spans several screen widths.
This is the default view for version 20.2 - note the CLOB doesn't display in full nor take the entire screen, it leaves room for the other columns.
You could of course always use the SUBSTR() function on your CLOBs to determine exactly how much data to show for casual browsing.

How to save column order and the width of the re-sized columns after changing the size of columns in NAT table into the prefernce

How to save Column order and width after changing their position and size ?
re-sized column width should be persisted and used in the subsequent sessions (and also considered during export/import preferences usecase)
any change in the column position should be persisted and used in the
subsequent sessions (and also considered during export/import
preferences usecase)
Q1. How can I get the column width of the nattable after changing the width by dragging/double click event ?
- I want this with original column position even after the column is not in the original order.
Q2. How can I get the column order, after re-order using drag and drop?
Answer to Q1:
Ask the layers, they have getWidth() and getColumnWidthByPosition(int) methods
Answer to Q2:
Typically you will need to check the ColumnReorderLayer directly.
But if you want to store and load NatTable states, you should have a look at the persistence mechanism provided by NatTable. I wrote an article about this and it is even documented on the NatTable website.

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.

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.

iTextSharp and moving some data to next page

I am creating an invoice using the iTextSharp. That displays nicely but sometime, when invoice items are larger in qty, the summary portion (which displays subtotal, tax, discounts, grand total etc) is splitted. Some displayes in current page and some moves to next page. I was thinking to move entire summary portion into next page, if current height left is not enough for that.
However, to do that, I need to know that how much page height is left (after my current page content rendering). I wonder if someone know how to calculate current left height of the page? OR if there is a property in the pdfPTable which may force the table to print itself as a whole and dont let it split across multiple pages! I guess if second option is available, it will be easy.
In summary, I need to know if it is possible to calculate remaining page height, and also if that is possible to force a table to NOT split across multiple pages.
thank you.
Sameers
You can set SplitLate to false to avoid auto page break in a cell data exceeds limit.
......
table.addCell(cellData);
table.SplitLate = false;
......
I suggest you use a nested table for your summary section. I don't believe iText will split a given cell on a page boundary, so everything in that cell (even if its a nested table with cells of its own) will stay on the same page.
Use the table's cell's row span so it takes up an entire row on its own.
I'm not certain, but I'd wager a beer on it.
What object are you using to add your data to the PDF? MultiColumnText, Paragraph, Phrase?
You should be able to use Document.PageSize.Height property to return the height of the Page.
Then use PDFPTable.Height to return the height of your table.
So just use the logic Document.PageSize.Height - table.Height, and you'll have the remaining y-axis space available.
The PDFPTable object has properties named SplitLate and SplitRows. I believe you can use these properties to try and keep the table on one page.