How do I display the icon on a general field in a grid. When I create a grid with a general field - only 'General' is displayed and clicking on general shows the icon.
Ive now managed to show the image by adding an oleboundcontrol in the grid column - however now the problem is that i can see the image only when the cursor is on the column - when the cursor is on another column this column shows blank. Any pointers on how to have all the icon images in the column displayed without having to go to the column.
What may or may not be suitable would be to use a single oleboundcontrol on the form which would become refreshed by the .AfterRowColChange() event of the grid.
Thus clicking on say a description field in the grid would display the relevant general field in the control. HTH
Matt,
Five things can be done to "speed it up".
1) Reduce the size and color depth on all the pictures. (The fewer the colors the less work your video card / driver / control will need to do.)
2) Set Sparse to .F. so it only needs to render the active image.
3) Reduce the number of visible lines in the grid.
4) Get a faster video card.
5) Get a faster system.
One alternative you could consider would be to use the Kodax Image Thumbnail Control, assuming that you are displaying graphical images. This supports annotations and titles.
In theory, you could create a large multi-paged .tif to act as an image container.
In you have Kodak Imaging on your system, it should be there by default, so the .ocx will be available to you.
I've never used it in an application but I do know Kodak Imaging supports command-line invocation, OLE, automation and provides ActiveX controls.
you havn't mention the purpose of the grid. it sounds like you may have a job for the listview control.
The Windows Forms ListView control displays a list of items with icons. You can use a list view to create a user interface like the right pane of Windows Explorer. The control has four view modes: LargeIcon, SmallIcon, List, and Report. The LargeIcon mode displays large icons next to the item text; the items appear in multiple columns if the control is large enough. The SmallIcon mode is the same except that it displays small icons. The List mode displays small icons but is always in a single column. The Report mode displays items in multiple columns. The view mode is determined by the View property. All of the view modes can display images from image lists.
I am using the grid for users to be able to view reports generated from from the foxpro application. Rather than having users go to specific directories to view a report - I have a dbf fiel to store a descirption of the report and in the general field a link to the report - could be a pdf file, ps file, txt file etc. Clinking on the link would open the report.
However, I now see that the just storing the link itself seems to take a lot of space since the size of the of the FPT file for 75 records is around 750K - which looks quite large just for storing 75 links.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.