Why isn't there an Image proprerty on Panel control?

sitajony

Active Member
Licensed User
Hi, I taken a look on the c# code source for the compiling for each control and saw that it's possible to set an image on a Panel control, I edited Panel, Label and ImageButton source code and it works very well like a Form...

It will be available in the next version directly in the IDE?

Thanks for your replies!
 

ExcludeReality

Active Member
Licensed User
I would like an Image property for panels because of the mouse events which the Image control doesn't have.
You could add them using the Door library, but that way you can't get the X and Y properties.
 

agraham

Expert
Licensed User
Longtime User
that way you can't get the X and Y properties.
Yes you can using the Data property of a Door Event object. See how to use the event Data in the last example in the Door help Overview topic which gets the Mouse button using the Button property. MouseDown, MouseUp and MouseMove events data all have X, Y and Button properties.
 

sitajony

Active Member
Licensed User
I meant that I changed the source code on Tzor folder and now I can set an Image propriete on Panel like a Form:
Control("Panel").Image="MyImage.Jpg"
It works great so why it's not already available officialy and directly on the IDE and on the panel proprietes in writing this:
Panel.Image="MyImage.jpg"
And on the Designer show the Image field enabled...

The labels and ImageButton controls takes the Panel background image, I edited:
-CEnhancedImageButton
-CEnhancedLabel
-CEnhancedPanel

It will be available directly in the next update?
 

sitajony

Active Member
Licensed User
There's just a small problem, In creating or modifing the Panel dimension it return 100x100 pixel so I've to draw my image with the same dimension of my Panel and then set it as Image background but otherwise it works great...
 
Top