Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Scrolling a vertical firemonkey TGrid?


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Oct 7, 2017 3:32 AM Last Post By: Tom Roberts Threads: [ Previous | Next ]
Tom Roberts

Posts: 102
Registered: 6/21/05
Scrolling a vertical firemonkey TGrid?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 3, 2017 10:07 AM
I've placed a firemonkey TGrid on my form, added 15 TColumns, set RowCount to 1000 and used the GetValue event to populate it. 30 Rows are visible. Pressing PgUp and PgDn scrolls the grid up one page / down one page (i.e. 30 rows) as expected.

If I click on the vertical scrollbar (on the top or bottom buttons or the whitespace in between) the grid scrolls 7 rows and not the expected 1 or 30. I would have expected this to work automatically but, if that's not the case, can anyone tell me the properties I'm supposed to change? I can see Min, Max properties along with a SmallChange property but no LargeChange property. Messing about with the first 3 didn't seem to change anything.

As a search of the problem brings up nothing I must be missing something really stupid but I'm clueless as to what it is.

Edited by: Tom Roberts on Oct 4, 2017 5:20 AM
To make problem clearer
Tom Roberts

Posts: 102
Registered: 6/21/05
Re: Scrolling a vertical firemonkey TGrid?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 4, 2017 10:11 AM   in response to: Tom Roberts in response to: Tom Roberts
Given how long Firemonkey has been on the go it's unlikely no one knows how to scroll a TGrid using the scrollbar, so either

1) I've got a special manic depressive's edition of RAD studio Berlin (I've ruled out corruption as TStringGrid shows the exact same behaviour) and in everyone else's edition the scroll bar works as expected.

2) It's blatantly obvious so no one can be bothered helping the stupid man.

3) It's so complex no one can be bothered helping the stupid man.

4) No one uses firemonkey.

5) Scrolling approximately 25% of the grid is the expected vertical scrollbar behaviour and my expectations are the result of senility.

Could someone at least type a number stating what, in their opinion, is the nearest.


Tom Roberts wrote:
I've placed a firemonkey TGrid on my form, added 15 TColumns, set RowCount to 1000 and used the GetValue event to populate it. 30 Rows are visible. Pressing PgUp and PgDn scrolls the grid up one page / down one page (i.e. 30 rows) as expected.

If I click on the vertical scrollbar (on the top or bottom buttons or the whitespace in between) the grid scrolls 7 rows and not the expected 1 or 30. I would have expected this to work automatically but, if that's not the case, can anyone tell me the properties I'm supposed to change? I can see Min, Max properties along with a SmallChange property but no LargeChange property. Messing about with the first 3 didn't seem to change anything.

As a search of the problem brings up nothing I must be missing something really stupid but I'm clueless as to what it is.

Edited by: Tom Roberts on Oct 4, 2017 5:20 AM
To make problem clearer
Tom Roberts

Posts: 102
Registered: 6/21/05
Re: Scrolling a vertical firemonkey TGrid?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 7, 2017 3:32 AM   in response to: Tom Roberts in response to: Tom Roberts
In the hope I could better understand the above I placed a fmx TScrollBar on the form. I discovered that setting the SmallChange property and clicking on the scrollbar top/bottom or the white space in between would change the Value property by SmallChange but I still couldn't determine how to effect a 'LargeChange'. Regardless of that, setting the SmallChange property of the TGrid's vertical scroll bar (either programmatically or via the style) changed nothing. It continued to scroll only 7 of the 30 odd records regardless of the SmallChange value. Anyway, like I said, if the scrollbar's part of the TGrid you'd have thought it would work automatically.

While working on the separate TSCrollBar I also found that none of the mouse events (click, down, over, dblclick etc.) were being called for it despite HitTest being true. I googled the problem and found the exact same question on stackoverflow unanswered from 7 months ago.

When i first evaluated fmx back in 2015 I actually touched on my opening question in this poat

https://forums.embarcadero.com/thread.jspa?threadID=119238&tstart=0

which also went unanswered. I gave up on fmx then and decided to wait till it was more stable / better supported. This time round I was a bit more excited about fmx but looks like the latest evaluation is going to go the same way. The fact that fmx's inventor has left embarcadero doesn't exactly fill me with confidence.

I downloaded the open source version of Qt this morning to take a look.

Tom Roberts wrote:
Given how long Firemonkey has been on the go it's unlikely no one knows how to scroll a TGrid using the scrollbar, so either

1) I've got a special manic depressive's edition of RAD studio Berlin (I've ruled out corruption as TStringGrid shows the exact same behaviour) and in everyone else's edition the scroll bar works as expected.

2) It's blatantly obvious so no one can be bothered helping the stupid man.

3) It's so complex no one can be bothered helping the stupid man.

4) No one uses firemonkey.

5) Scrolling approximately 25% of the grid is the expected vertical scrollbar behaviour and my expectations are the result of senility.

Could someone at least type a number stating what, in their opinion, is the nearest.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02