[Gambas-user] DrawingArea Questions

Laurent Carlier lordheavy at ...512...
Fri Jan 20 22:51:46 CET 2006


Le Vendredi 20 Janvier 2006 01:25, Ron Gottstein a écrit :
> Hello,
>
> I am designing a paint program and have a few
> questions.
>
> 1.  I have a DrawingArea labeled Da1. I created a
> label to be placed in Da1 as follows.
>
> Dim lbDa1text as Label
> lbDa1text = NEW Label(Da1) as "lbDa1text"
>
> I can insert text into the new label and it appears on
> Da1 as desired.
>
> Problem:
>
> I want to be able to move the labeel (lbDa1text) with
> a mouse event.
> I created this code:
>
> Public Sub lbDa1text_MouseMove()
>
> lbDa1text.Move(Mouse.X, Mouse.Y)
>
> End
>

The mouse event will be raised if a mouse button is pressed and the mouse is 
moved, if not, post a sample of code with the issue.

> Nothing happens.   Help Please.
>
>
> 2.  Is it possible to gain focus of a drawing
> (draw.line) after it is placed into a drawingarea?  If
> so, help.
>

Give the focus of to the line ? it isn't possible. Otherwise you can give the 
focus to the drawingArea (or to another widget) with the SetFocus() method.

Regards,

-- 
jabber : lordheavy at ...943...
mail : lordheavym at ...1227...





More information about the User mailing list