fudadmin Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
Ultimate Contributor Administrator
mjkoskin wrote on Sun, 07 May 2006 08:40
yes I've looked at them, but why the image is set as label?
Why are you unhappy with label? You wrote:
"I need to extract the data to Image and then display it (ImageDraw I think)."
Label is sufficient to "display it"
And it has already Paint and ImageDraw inside. (You can study LabelBase.h/cpp in CtrlLib if you need examples. find w.DrawImage(ix, iy, limg, lcolor)
So you don't have to program it. Even more you can add nice borders and/or text. e.g if image not found or loading was incorrect.
And also you can easily (I think) make scrollable image viewer
using ideas from: http://www.arilect.com/upp/forum/index.php?t=msg&th=260& amp; amp; amp;start=0&
if you change buttons to labels.
Edit1: Or you can use the same buttons if you want to click on you image and open you image editor etc.
btn.SetImage(const Image& img);
Edit2: But if you need zooming, then you must use something from nImage.