Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Images in grids?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01169530
Message ID:
01169535
Views:
25
This message has been marked as the solution to the initial question of the thread.
>Is there any way to have a grid display a different image for each row based on the value of a field. In other words, if a field in the table contains an file path + name or if a general or memo field contains the binary contents of an image, is there any way to get the grid to display this image?
>
>I know I can set the CurrentControl of a column to an image control but the image control does not seem to be able to be able to use the contents of the column's control source in the same way that a textbox or checkbox control can.
>
>I wanted to be able to display a grid of countries with each countries flag. The only way I know of doing this is one of the following:
>
>Using a Grid
>Scan through the country table.
>For each record, instantiate an image control, add it to the grid's column and set its property to the country's flag image.
>Use the grid columns DynamicCurrentControl property to set the column's current control to the image control that represents the current row's flag.
>
>Using a ListBox
>Instead of tying the listbox straight to the table I would have to:
>Scan through the table.
>For each record, add a new item to the listbox and set that item's picture to the flag image.
>
>Neither one of these scenarios is all that appealing. It's kind of nice when you can just define the number of columns in a grid, set the control source for the columns and just run the form and let Fox handle the display of the data. It'd be nice for that to apply to images as well.


Check Images, containers in grid FAQ #7934
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform