Question about Grid + dwg-preview images

Started by zdjapjas, December 16, 2011, 09:22:41 AM

Previous topic - Next topic

zdjapjas

Hello everyone,

I recentry found openDCL and I am very impressed with it! I like it very much.

Currently I am planning to rebuild a tool I had developed for the firm I work for and which was programmed by a small company which now ceased to develop the tool further. So I am not able to add or change functionality to it. The tool I am talking about is an advanced blockmanager which presents multiple librarys to the user and after he/she clicked on a certain library folder a list of blocks is presented with additional info about the block (that info is stored in separate .ini files). Please see the picture I added to this post for reference.

To recreate this certain funktionality I need a tree view which shows the directorys. That is no problem. Secondly, I would need a grid control which would be capable of showing the dgw-preview images of the blocks it would show. I know of the dwg-list control but this would only show the image and the filename but not additional data. (Add to that some odd behaviour like sometimes the dwg-filename is above the image, sometimes in front of it (seems to depend on length of filename) and the image background is black instead of the background-color if the grid.)

So my questions are:
Is it somehow possible to use the grid-control to behave like I need it?
Or would it be possible to change the dwg-list control to allow more columns, set the row height, set where it should show the filename and show additional data?

I guess the easiest solution would be to allow to change the associated image-list at runtime. I know there's a feature request about that already since 2009 ( http://sourceforge.net/tracker/?func=detail&aid=2854664&group_id=187950&atid=923366 ) but so far it seems to me nothing has happend with that. Also this would not be enough. It would be necessary to add a function which could read the dwg-thumbnail of a file stored on the network and add that image to the imagelist.

A lot of features that I would like to have :)

regards
Zoltan

Fred Tomke

Hi, Zoltan,

there was a similar tool in the past. I converted it for them from AutoCAD DCL to OpenDCL and I added database functionality for it.

The thing is: what you see is a kind of overriding the display of a grid cell. The OpenDCL built-in grid control doesn't support block preview or dwg preview: it can only display icons from the grid-internal image list.
So, which alternative ways are there? To built the same form you can program it in C# or you just define a customcontrol in C# that inherits a grid and you override the cell display by OwnerDraw. If you define it in an ActiveX control you can also add it to an OpenDCL form like a palette. If you want to solve it in pure OpenDCL I'd create a picture box and show all components (like images texts and so on) by using the draw-methods. These are the only ways I see right know.

The screenshot you've shown tells me that you and your existing tool are German :) ?
Don't hesitate to contact me by mail for further communications.

Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

zdjapjas

Hello Fred,

Thank you for the answer.
I see this and some other things I am currently thinking about both lead to this one conclusion: learn C#

:)

Zoltan