I have the issue with Rowtablearea2 Control. There is a ROWCOUNT & HIGHT attributes which according to the documentation
If a HEIGHT value is defined an addition (e.g. as percentage value
“100%”) then the number of rows depends on the actual height of
the control. The ROWCOUNT value in this case indicates the
maximum number of rows that is picked from the server.
The ROWCOUNT is 12 and normally it has only 3-5 values. I specified HIGHT in pixels and it just doesn’t work. It makes no difference whatsoever what value in pixels I put from 20 to 500.
Is it something of my wrong doing or it is simply a bug?
…well, I have to admit that you are right. I am not yet aware of what it has to do with the problem, but…: if you set the width of the ROWTABLEAREA2 to 100% instaed of 725 then it works.
Yes and no really. Originally I wanted to change the height to show only 6 rows out of 12 and assumed the scrolling will be automatically enabled. I’ve just tested it and it isn’t the case. Once the WIDTH set to “100%” the HEIGHT parameter does take effect, however the scrolling doesn’t work. The VSCROLL set to “scroll”. It appears from the documentation that if the ROWCOUNT is bigger than what fits on the screen due to HEIGHT the scroll bar should be at least available. I am unclear if there is a need to implement a listener or not for this control. It doesn’t look that way. May be I am interpreting the documentation incorrectly.
P.S. Hope the bug is logged appropriately, or is it better to open a support call?
first: if you want to show 6 rows then specify ROWCOUNT=“6” - and do NOT specify a height in addition. The control will take the space it requires.
(The additional specification of the height typically is done in “percentage scenarios”: the ROWTABLEAREA2 should occupy “100% of available height”. But also works with pixel heights…)
Even in the scenario that you mention the vertical scrollbar should appear - without any registration of listeners etc.
Bug-logging: I recommend to write bug report in parallel - this is the only guaranteed, follow-up-able way for you! Never trust development minded people…
Ok, I’ve tried this way before, and the only reason I went into specifying the height was that it didn’t work. I specified the ROWCOUNT=2. The scroll bar appears when there is more then 2 items in the collection, however it doesn’t scroll through the elements.
I just tested your layout with the following program: when pressig the “Get my vehicles” button then 100 items are loaded - scrollbar is displayed automatically + scrolling works fine.
Bjoern
BTW: HSCROLL=“true” in the ROWTABLEAREA2 controls allows you to horizontally scroll the grid once the content of the grid exceeds the available width.
having the same problems as Mikhail, but additionally nothing is displayed when even the width is set to 100% (rowcount = 20; height = 100%). → As soon as the height is set to a percentage value nothing shows up (taking away the height or setting it to a fixed pixel value, everything is fine) !!!
Here is the XML:
<?xml version="1.0" encoding="UTF-8"?>
Please let me know if there is something off, or if it is a bug.
Sizing with percentages means you always have to think about where the percentage definition refers to. In other words: the parent controls have to provide the space so that the contained controls (which says 100%) knows what the 100% refers to.
In your case you need to tell the pagebody to occupy the full heigh (attribute takefullheigh=true), afterwards the grid should appear.
Additional comment: it’s the same as with plain HTML:
hhhhh
If the table is not set to a height of 100% itself the height of the cell will be following its content. 100% from 0 is 0
Bjoern
PS: do not misunderstand me - this is a quite tough issue… the golden rule is: if you see nothing but expect to see 100% ==> follow the control-hierarchy from the bottom to the top (pagebody). In 2.2 we will introduce an automated way of setting the heights in the control hierarchy… (planned for Nov/Dec 2006)
got it and makes sense, sort of similar to certain layout manager of Java in respect of the get/setPrefferedSize(…) method, it also depends on the hierarchy.