Jump to content
limelect

ToolBar just knoledg

Recommended Posts

I copied a toolbar from the Gexpert procedure list form

Now, someone can explain

The toolbar is on a NEW FORM.

As one can see from the DFM, it has 2 sections

 

 object ToolBar: TToolBar
    Left = 0
    Top = 27
    Width = 552
    Height = 22
    AutoSize = True
    DisabledImages = dmSharedImages.DisabledImages <<<<<<<
    Images = dmSharedImages.Images<<<<<<<<<<<<<

And the buttons show the icons

On the form, there are no uses !!!! for it

image.thumb.png.d5867fdbf056981a045e5629e4e0a0f6.png

 

Can anyone explain why I see pictures on the buttons?

Is it because GEXPERT is in my IDE?

This means I can use all Delphi resources, even if they are hidden.

P.S. Running this form, the icons disappear !!!
 

Share this post


Link to post
2 hours ago, limelect said:

Can anyone explain why I see pictures on the buttons?

Maybe because in design time you copied the toolbar from dmSharedImages module on your form.

While pasting the toolbar on your form the IDE knows where the images are located.

That's why you see on the form Images = dmSharedImages.Images

In Runtime your form has no connection to the dmSharedImages, so the images are ignored and they disappear.

Share this post


Link to post
Posted (edited)
30 minutes ago, Die Holländer said:

Maybe because in design time you copied the toolbar from dmSharedImages module on your form.

While pasting the toolbar on your form the IDE knows where the images are located.

That's why you see on the form Images = dmSharedImages.Images

In Runtime your form has no connection to the dmSharedImages, so the images are ignored and they disappear.

The only way it knows is from the Gexpert DLL, which means that it has hidden resources.

Try it yourself and see if you have the Gexpert source

P.S. I just copied the toolbar from the FORM ( procedure list), nothing else!!!!!!!!!!!

 

Edited by limelect

Share this post


Link to post

@Die Holländer My problem is understanding why I see the

bmp on the keys, even though I have no link to any

bitmaps

Just try it and see if you can explain the phenomenon

Get Gexpert procedure list from the source and copy the toolbar to a new form

That's it.

 

Edited by limelect

Share this post


Link to post

You see he images because the IDE will copy paste the reference to the imagelist on the DM. The compiler will find the DM containing the pictures and will show them. You can save the form, close all the projects and open the form the IDE will remove the reference to the datamodule and you will not see the pictures anymore.

Share this post


Link to post
47 minutes ago, Lajos Juhász said:

You can save the form, close all the projects and open the form the IDE will remove the reference to the datamodule and you will not see the pictures anymore.

I doubt that is correct. The datamodule dmSharedImages containing the image lists is part of GExpert and as long as GExpert is loaded in the IDE the datamodule exists and the references are resolved. The problem happens during runtime only.

 

BTW, 3rd party plugin developers should be aware of this and name their forms, frames and datamodules with in mind.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×