linking canvas color with picker? #255
Unanswered
Jake-Jasper
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Hey 😊 your way to link the color picker to the fill style should work. You are not drawing anything with a fill style yet though, you are only using |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi Martin, Thanks for the response. I think I see where I was going wrong. I was thinking that when I changed the color of the line via the color picker and linking it, that was what was changing the line color, but of course it doesn't get changed until there is a mouse action! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Sorry if this is the wrong place for this!
I am modifying the hand drawing example but I am having trouble linking the color picker with a change in canvas color and wondered if anyone could take a look and see what I am doing wrong.
Here is my modified code:
`from ipywidgets import Image, ColorPicker, link, AppLayout, HBox, VBox, widgets
from ipycanvas import hold_canvas, Canvas
class JupyterBlackboard:
if name == "main":
JupyterBlackboard()`
I was expecting
link((self.canvas_col, 'value'), (self.canvas, 'fill_style'))
to update the canvas color, but clearly this is not the case. What have I misunderstood here? As this works fine for the fill style.Beta Was this translation helpful? Give feedback.
All reactions