I guess it is the need to use the draw event in order to do anything 
with the drawing area that had me spun. I think in terms of methods, 
properties and events, but I do not think in terms of events being the 
very thing that actually does the work.

I'm thinking of it now in terms of Macros, using the Object.Call(me, 
$sFunctionName) treats the code in $sFunctionName like a Macro, (am I on 
the right track?) Flexible & powerful yes. Intuitive in it's usage, not 
so much.

What I want to do is use a drawing area to create a matrix of images & 
Text to be printed out on business card stock (Avery 5371). I *think* I 
am begining to see how this can be done... but it is all still somewhat 
murky. If I can get the images arranged in the DrawingArea then the next 
step is to persist the DrawingArea to a file as a PNG, or perhaps a PDF 
(I have no clue how I'm going to do that yet), and then spool that file 
out the the printer using a shell command (unless there is a better way 
to do it from within GAMBAS).

One of the things that really confused me was the paint.reset command 
telling me it had no device.... ummm... no "device"? To me a device is a 
piece of hardware, a printer, a modem, a screen, keyboard, mouse, 
soundcard, NIC, Com port etc. It didn't make sense to me and I saw no 
way to give paint.reset any kind of parameter to point it to the object 
on which it could be used. It really threw me, until I realized that 
Paint.Reset when called from within the DRAW event of a drawing area 
gave it context. I fully expected to use the drawing area as an object, 
something like DrawingArea1.reset. Anyway I'm past that now, and busy 
documenting my education. BTW, how does reset differ from clear?

On 09/02/2014 05:30 PM, Jussi Lahtinen wrote:
> FMain contains subs named Example## (where ## are numbers).
> These subs are executed in Draw event "DrawingArea1_Draw()", with command
> Object.Call(Me, $sFunctionName). So that Example1 is same as "Arc" ,
> Example2 is "Arc negative", Example3 is "Clip", etc.
>
> You can write all the content of those subs directly into draw event.
>
> Here are the paint commands:
> http://gambaswiki.org/wiki/comp/gb.qt4/paint
>
> And here is more about the drawing area:
> http://gambaswiki.org/wiki/comp/gb.qt4/drawingarea
>
> I'm not sure what is the problem exactly, so, give some more information
> (code?) on what you are trying to do and how it fails (error messages)?
>
>
> Jussi
>
>
>
> On Tue, Sep 2, 2014 at 11:42 PM, Stephen<sbun...@smartsonsite.com>  wrote:
>
>>     Has anyone got some good documentation on how to use a Drawing Area,
>> quite frankly I've gone cross-eyed trying to make sense of it by parsing
>> the paint example.
>>
>> Steve.
>>
>>
>> ------------------------------------------------------------------------------
>> Slashdot TV.
>> Video for Nerds.  Stuff that matters.
>> http://tv.slashdot.org/
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>


-- 
Kindest Regards
Stephen A. Bungay, Prop.
Smarts On Site Information Systems


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to