Watch, Follow, &
Connect with Us

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


Welcome, Guest
Guest Settings
Help

Thread: ListView - Strange behavior



Permlink Replies: 2 - Last Post: Nov 1, 2016 12:33 AM Last Post By: Markus Humm
Dick Wong

Posts: 2
Registered: 11/4/16
ListView - Strange behavior
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 31, 2016 7:24 AM
Dear all,

I have an Mobile app which developed by Delphi Berlin 10.1 and there are TWO TabItems in the TabControl.

Here is the details:
TabControl1 have TabItem1 and TabItem2

TabItem1 have a listview with all the data extracted from the MS SQL server. If user click the item , it will go to tabitem2 that have the ScaledLayout ->VerticalScrollbox1-> Image, product details description.

Questions:
1. If I first run the app and click the item, it can display the image with the details product description (e.g 25 lines of this product description).
OK
If I back to the first listview and then click another item, it go to the tabitem2 BUT IT STILL CAN ONLY DISPLAY 25 LINES BUT THIS ITEM SHOULD HAVE 45 LINES. ALSO, IT WILL GO TO THE LAST POSTION ... IT SEEMS REMEMBER WHERE YOU LEAVE FROM THE FIRST ITEM.

WHAT AM I MISSING ?? PLS HELP.

Thanks.
David Schwartz

Posts: 137
Registered: 8/28/00
Re: ListView - Strange behavior
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 31, 2016 2:35 PM   in response to: Dick Wong in response to: Dick Wong
Dick Wong wrote:

tabitem2 that have the ScaledLayout ->VerticalScrollbox1-> Image, product details description.
I don't use scrollboxes very much because they don't behave nicely. The size of the scrollbar adjusts to the height of the scrollbox, which does not dynamically adjust itself (if I recall correctly). In other words, they're a PITA if you need to resize them. Sounds like that hasn't changed.

I'd probably try something else that lets you drop on different things, like a TListView with one column and two rows. Put your image in the top spot and the text in the bottom spot. It will adjust the vertical scaling and scrolling for you.

Someone will probably jump in here and explain how easy it is to adjust the scrollbox, so hang in there. (Did you search Stack Overflow for tscrollbox?)

-David
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: ListView - Strange behavior
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 1, 2016 12:33 AM   in response to: Dick Wong in response to: Dick Wong
Am 31.10.2016 um 15:24 schrieb Dick Wong:
Dear all,

I have an Mobile app which developed by Delphi Berlin 10.1 and there are TWO TabItems in the TabControl.

Here is the details:
TabControl1 have TabItem1 and TabItem2

TabItem1 have a listview with all the data extracted from the MS SQL server. If user click the item , it will go to tabitem2 that have the ScaledLayout ->VerticalScrollbox1-> Image, product details description.

Questions:
1. If I first run the app and click the item, it can display the image with the details product description (e.g 25 lines of this product description).
OK
If I back to the first listview and then click another item, it go to the tabitem2 BUT IT STILL CAN ONLY DISPLAY 25 LINES BUT THIS ITEM SHOULD HAVE 45 LINES. ALSO, IT WILL GO TO THE LAST POSTION ... IT SEEMS REMEMBER WHERE YOU LEAVE FROM THE FIRST ITEM.

WHAT AM I MISSING ?? PLS HELP.

Thanks.

Hello,

asiking this over in the Firemonkey group will result in way more
answers I guess...
It's a technical question anyway...

Greetings

Markus
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02