P pochero Member Licensed User Nov 18, 2008 #1 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
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 Nov 18, 2008 #2 pochero said: I'm trying with imagelib library, but my brain says stop... Thank you Click to expand... 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) Click to expand... assuming the iist is populated with 60 images(worst case cenario) imagine the minute to be 15.. Imagebutton1.image = Imagelist1.item(15)
pochero said: I'm trying with imagelib library, but my brain says stop... Thank you Click to expand... 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) Click to expand... assuming the iist is populated with 60 images(worst case cenario) imagine the minute to be 15.. Imagebutton1.image = Imagelist1.item(15)
Erel B4X founder Staff member Licensed User Longtime User Nov 18, 2008 #3 The attached program demonstrates how to draw on an offscreen bitmap and update the ImageButton. Attachments 1.sbp 1.sbp 935 bytes · Views: 414
P pochero Member Licensed User Nov 18, 2008 #4 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
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
Erel B4X founder Staff member Licensed User Longtime User Nov 19, 2008 #5 I've attached an old example which demonstrates how to draw part of an image. You will need something like that to draw the right part on the right image. Attachments Image.zip Image.zip 3.3 KB · Views: 415
I've attached an old example which demonstrates how to draw part of an image. You will need something like that to draw the right part on the right image.
P pochero Member Licensed User Nov 25, 2008 #6 It was very hard for me but finally it works, thank you.
Erel B4X founder Staff member Licensed User Longtime User Nov 25, 2008 #7 You are always welcome to share your results. I'm sure that it will help other users as well.
P pochero Member Licensed User Nov 26, 2008 #8 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.
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.
Erel B4X founder Staff member Licensed User Longtime User Nov 27, 2008 #9 Try to use regular Image controls instead of ImageButtons. It should work fine with Images.
P pochero Member Licensed User Nov 27, 2008 #10 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
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