Spinner not working

Hello, I'm having problem with the spinner blocks. It's supposed to change the paint color of the canvas and we can draw with that particular color. One is supposed to change the line width. but it is not working. Can anyone help?

Here are the blocks:




You look ready to learn how to use lookup tables.

tbh I'm new here.

What does that mean?

Your blocks are highly repetitive. Take Spinner2. AfterSelecting as an example. Instead of checking the line width over and over again, why not set the line width to the selection directly?

For Spinner3, why not try something like this?

Canvas.aia (2.5 KB)

The Canvas1. Dragged event is invoked when the user has scribbled on the canvas. It just draws the line.

Okay, I'll try.....

Here is an example of a lookup table for color names:

@gordonlu310 It's not working still

What's the error?

Show your new blocks. My AIA was tested and it is working.

If you're making a scribbling app, ideally you have to incorporate the Dragged event as I showed. The PaintColor and LineWidth properties only apply to drawing activities after setting these properties.

These are my blocks:



@AyProductions It's given in my topic.

is linewidth a Dictionary?

are there all your blocks? I did not see the code for drawing.

These are the rest of the blocks:



Blocks for drawing:

i said whether the error is still the same that time :slight_smile:

Oh sorry. Yes, I was having the same problem that time.

My main problem is not with the drawing of lines. it's about changing the colour and width of the line.

Are you creating a scribbling app?

1 Like

Oh yes.

A nice example about "How to solve a problem the most cumbersome way as possible"...

What about this

Taifun

2 Likes