Draw image on imageButtons

pochero

Member
Licensed User
For a digital clock which may change the hour and minute manually. In the example, how can I draw a single digit on the imagebuttons? The digits are images (in the ImageList)
I'm trying with imagelib library, but my brain says stop...
Thank you
 

Cableguy

Expert
Licensed User
Longtime User
I'm trying with imagelib library, but my brain says stop...
Thank you
What for?
you don't need special libs to just show an image from an image list...

For a digital clock which may change the hour and minute manually. In the example, how can I draw a single digit on the imagebuttons? The digits are images (in the ImageList)
assuming the iist is populated with 60 images(worst case cenario)
imagine the minute to be 15..
Imagebutton1.image = Imagelist1.item(15)
 

pochero

Member
Licensed User
cableguy, one half of a digit is on one imagebutton, the other half on another imagebutton, so i can't do what you say.

Erel, the problem is that i need to write one image on two imageButtons.

Thank you
 

pochero

Member
Licensed User
It doesn't work well yet. I get a outofmemoryexception at the device. It seems imagelib objets doesn't free memory when they are reused.
Also the background image of imagebuttons doesn't appear.
There is a refresh problem in windows. At device clock works ok (except for the memory problem)

The attached code shows my problem.

Thank you.
 

pochero

Member
Licensed User
I need imagebuttons because in my app I can stop de clock and manually change hours and minutes by pressing the buttons (increase and decrease).
May be I should do it whith images and capture the click events. It is more ugly but if it works....
Thank you
 
Top