Drawing form in visualworks smalltalk

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Drawing form in visualworks smalltalk

lhhuong
Hi all,
I need to create a form allows you to draw: circle, rectangle,line...
Example: if user click on "circle button", it will draw a circle on view panel.

Do you have any example the same i descripted????
help me, please.
Reply | Threaded
Open this post in threaded view
|

Re: Drawing form in visualworks smalltalk

askoh
Administrator
Look at GF/ST or HotDraw. They are parcels distributed with VW.
In VW launcher
Click/System/Parcel Manager/
Select/Graphics and UI folder/
You will see GF/ST demo and HotDraw to load.

Aik-Siong Koh
Reply | Threaded
Open this post in threaded view
|

Re: Drawing form in visualworks smalltalk

lhhuong
Thank you very much.
I used graphicsContext on form, and drawing on current form.

gc:=  Window currentWindow graphicsContext.

But when i set color for gc as below:

gc setPaintToColor: #red.

I get an error.

Do you know how to set color for gc????
Reply | Threaded
Open this post in threaded view
|

Re: Drawing form in visualworks smalltalk

lhhuong
This post was updated on .
I found the solution:
using ColorValue perform: #red.

It's ok.