Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

General field in Grid

Status
Not open for further replies.

mm0000

IS-IT--Management
May 19, 2002
295
IN
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.

thnks in advance
 
Cont...

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.

thanks in advance
 
Chris,

Thanks - it works - but it now takes a long time for the grid to load and navigate through the grid - anyway to speed this up?

Thanks
Matt
 
Matt

Afraid not is the simple answer.

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

Chris [pc2]
 
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.

Rick
 
Matt

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.

HTH

Chris [pc2]
 
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.

go to microsoft knowledge base and search on

Q253457

Demonstrates the ListView Control



Attitude is Everything
 
Thanks for all the suggestions.

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.

Any more efficient way of doing what I want?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top