0
votes

I am using Delphi 2009 and I have set (of variable length) of records with the data <image, label, file path> and I would like to present those records in gallery-like structurei with the horizontal scroll of the entire list and, possibly, with no vertical scroll.

TDBCtrlGrid seems to be exact solution (I can keep records in the TClientDataSet and there is lot of automation in place), but is vertical-only collection (at least for Delphi 2009), it has Orientation property but (at least in design time) it controls the scrollbar only (places it in the bottom). So - maybe it is still possible to adapt TDBCtrlGrid for horizontal use?

TScrollBox (with TFrame child elements) is another promising solution, but so far I can achieve that all the frames are stacked vertically and I don't see how can I ask them to be side-be-side horizontally. So - is there way to use TScrollBox for horizonatl, gallery like structure?

I have reserved the option to use TcxDBVerticalGrid, but I am doing everything to avoid it - I am not sure about the capabilities of the complex grid to present images with its own image internal component, I prefer to use TImage or TDBImage component (seems to be robust) inside some container of controles (e.g. on TFrame and put those frames in TScrollBox).

1
I corrected my question - of course, I was thinking about TDBCtrlGrid. I asked about those 2 standard components, my fail - I had to open separate question for each component. TcxDBGrid is not suitable here anyway - it displays one record in vertical fashion, but I am thinking about gallery behavior when at least 2-3 pictures as visiable at the same time.TomR
TcxDBGrid - if you meant TcxGrid - it should be very straightforward to achieve it using card/layout view.BrakNicku

1 Answers

4
votes

Assuming the question is something like "How can I make TDBCtrlGrid work in horizontal mode?"

In addition to setting the orientation, you should also set RowCount and ColCount to some decent values.