Re: [Gambas-user] How to draw on a ScrollArea from with in a class that inherits ScrollArea?

2015-10-12 Thread Fabien Bodard
The case where you need to inherit the scrolling area are rare. I use it for MapView, DocumentView, Benoit use it for gridview, and all inherited controls, but do not inherit it. See all the gambas gb code in gb.gui.base or gb.form or gb.mapview 2015-10-12 18:59 GMT+02:00 Moviga Technologies : >

Re: [Gambas-user] How to draw on a ScrollArea from with in a class that inherits ScrollArea?

2015-10-12 Thread Moviga Technologies
Aha! The problem seems to be that I created the observer in the class header, as opposed to you in the constructor. -- ___ Gambas-user mailing list Gambas-user@lists.sourc

Re: [Gambas-user] How to draw on a ScrollArea from with in a class that inherits ScrollArea?

2015-10-12 Thread Tobias Boege
On Mon, 12 Oct 2015, Moviga Technologies wrote: > > > Yes, I also think that this solution is better than the inital one, but > just for the sake of learning; how could I practically do it? > >From what you said, I tried creating an observer on Me, but then I > realised that the observer's event

Re: [Gambas-user] How to draw on a ScrollArea from with in a class that inherits ScrollArea?

2015-10-12 Thread Moviga Technologies
Yes, I also think that this solution is better than the inital one, but just for the sake of learning; how could I practically do it? >From what you said, I tried creating an observer on Me, but then I realised that the observer's events are run either before of after the observed object's event

Re: [Gambas-user] How to draw on a ScrollArea from with in a class that inherits ScrollArea?

2015-10-12 Thread Tobias Boege
On Mon, 12 Oct 2015, Moviga Technologies wrote: > Your example works I realise now that the problem was that I called > Test() from within the class, but you are calling it from the outside. I > guess the ScrollArea was not properly instantiated. Is there any way to > test if the class has been

Re: [Gambas-user] How to draw on a ScrollArea from with in a class that inherits ScrollArea?

2015-10-12 Thread Moviga Technologies
Your example works I realise now that the problem was that I called Test() from within the class, but you are calling it from the outside. I guess the ScrollArea was not properly instantiated. Is there any way to test if the class has been properly created from within the .Class file? (It re

Re: [Gambas-user] How to draw on a ScrollArea from with in a class that inherits ScrollArea?

2015-10-12 Thread Tobias Boege
On Mon, 12 Oct 2015, Moviga Technologies wrote: > > > OK, I think I found a solution. I inherit a UserContainer, and create a > ScrollArea inside :) That should do it! This is in general the better approach. It doesn't expose unnecessary interfaces. But I wonder what you found a solution for

Re: [Gambas-user] How to draw on a ScrollArea from with in a class that inherits ScrollArea?

2015-10-11 Thread Moviga Technologies
OK, I think I found a solution. I inherit a UserContainer, and create a ScrollArea inside :) That should do it! -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.n

Re: [Gambas-user] How to draw on a ScrollArea from with in a class that inherits ScrollArea?

2015-10-11 Thread Moviga Technologies
Yes... -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user

Re: [Gambas-user] How to draw on a ScrollArea from with in a class that inherits ScrollArea?

2015-10-11 Thread Moviga Technologies
If I just call Paint.Something I also get an error "No current device". -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lis

Re: [Gambas-user] How to draw on a ScrollArea from with in a class that inherits ScrollArea?

2015-10-11 Thread Benoît Minisini
Le 12/10/2015 02:05, Moviga Technologies a écrit : > Hi! > > In my class I inherit ScrollArea, and I want to draw on it from within > the class. > When I do Paint.Begin(Me) I get an error that this is "Not a paintable > object". How should I do this? > Have you read the documenation of the ScrollA

Re: [Gambas-user] How to draw on a ScrollArea from with in a class that inherits ScrollArea?

2015-10-11 Thread Tobias Boege
On Mon, 12 Oct 2015, Moviga Technologies wrote: > Hi! > > In my class I inherit ScrollArea, and I want to draw on it from within > the class. > When I do Paint.Begin(Me) I get an error that this is "Not a paintable > object". How should I do this? > You should not use Paint.Begin() at all. You

[Gambas-user] How to draw on a ScrollArea from with in a class that inherits ScrollArea?

2015-10-11 Thread Moviga Technologies
Hi! In my class I inherit ScrollArea, and I want to draw on it from within the class. When I do Paint.Begin(Me) I get an error that this is "Not a paintable object". How should I do this? --