[Gambas-user] Label.Resize in Picture1_MouseMove

Demosthenes Koptsis demosthenesk at ...626...
Sat Jan 1 19:37:34 CET 2011


Do you suggest to use the DrawingArea instead PictureBox?

As i see the draw event is in DrawingArea only.

My intension is not to draw something.

i want to resize an object with transparency and border (as Label) and
after to use its X,Y, Width, Height in Image.Copy object.


On Sat, 2011-01-01 at 18:34 +0100, Fabien Bodard wrote:
> label is not the only solution ... this is how I manage the box
> selection on many program.
> 
> You need to use more the draw event and think like with a game
> ....refresh all composed image on move :)
> 
> Gambas work that way.
> 
> 2011/1/1 Demosthenes Koptsis <demosthenesk at ...626...>:
> > hello,
> >
> > i converted my Mini Image Editor (demostration of Image class)
> > to Gambas3 at ubuntu 10.04 machine.
> >
> > i want to simulate a selection box tool for an image.
> > For this i made something not so professional but i think i found
> > something.
> >
> > For the selection of image area i use a label as gui with
> > 1) transparency
> > 2) border etched
> > 3) and no text
> >
> > when the user select an area from the PictureBox the Label with these
> > properties resizes and shows the selected area from the picture.
> >
> > i know that this is not a pro way but i wanted a fast solution and avoid
> > to make my one object, at this point.
> >
> > Now the problem.
> >
> > When the user grow the selection box from up-left to down-right the
> > Label object refreshes correctly and shows its Etched-border.
> > http://www.mediafire.com/imgbnc.php/4bc70a02a6a13510e9066b6e8a712fd1931d713bdd18b8556174a6382fb226744g.jpg
> >
> >
> > When the user move back the mouse pointer (from down-right to up-left)
> > of selection box the Label object is resized but does not draw its
> > border correctly...
> > http://www.mediafire.com/imgbnc.php/9e738ebdc8b6a49a9e298a50a38ae6eebf0990d655099fc62345f98c3d20e05d4g.jpg
> >
> >
> > i also give url with the project.
> > http://www.mediafire.com/?dsn3jptqd9prqkp
> >
> >
> >
> > --
> > Regards,
> > Demosthenes Koptsis.
> >
> >
> > ------------------------------------------------------------------------------
> > Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> > to consolidate database storage, standardize their database environment, and,
> > should the need arise, upgrade to a full multi-node Oracle RAC database
> > without downtime or disruption
> > http://p.sf.net/sfu/oracle-sfdevnl
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> 
> 
> 

-- 
Regards,
Demosthenes





More information about the User mailing list