lawsie / guizero

A Python 3 library to allow learners to quickly and easily create GUIs.
https://lawsie.github.io/guizero
BSD 3-Clause "New" or "Revised" License
406 stars 81 forks source link

Using Drawing... #474

Closed WarrenLead closed 1 year ago

WarrenLead commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behaviour:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behaviour A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

System information:

Additional context Add any other context about the problem here.

WarrenLead commented 1 year ago

I want to draw a circle then delete the previous circle and draw a new one in a different postion one at a time. Manual says returns id? How do i find the id of the circle I want to delete? using delete() statement? Not much mention of this in the docs and examples.

martinohanlon commented 1 year ago

Using the example from the docs for drawing a rect. An oval (or circle) is the same.

from guizero import App, Drawing
app = App()
drawing = Drawing(app)

rect_id = drawing.rectangle(10, 10, 60, 60, color="blue")
drawing.delete(rect_id)

app.display()

Providing a description and example in the issue text rather than the title is much more helpful.

Removing bug label.

WarrenLead commented 1 year ago

Mate, the bug is that the documentation is not very clearSent from my iPadOn 7 Jul 2023, at 4:47 pm, martinohanlon @.***> wrote: Using the example from the docs for drawing a rect. An oval (or circle) is the same. from guizero import App, Drawing app = App() drawing = Drawing(app)

rect_id = drawing.rectangle(10, 10, 60, 60, color="blue") drawing.delete(rect_id)

app.display()

Providing a description and example in the issue text rather than the title is much more helpful. Removing bug label.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

martinohanlon commented 1 year ago

"mate" ?

The documentation describes the return values and parameters for all these classes and functions. This is how I was able to provide you with an example to fix your problem.

It is not the job of the documentation to cover every eventuality nor my job to provide you with solutions to your problems.

WarrenLead commented 1 year ago

Thank you this fixed my problem. Best regards 

Warren Leadbeatter

----- Original Message ----- From: "lawsie/guizero" To:"lawsie/guizero" Cc:"Warren Leadbeatter" , "Author" Sent:Thu, 06 Jul 2023 23:46:44 -0700 Subject:Re: [lawsie/guizero] Using Drawing... (Issue #474)

Using the example from the docs for drawing a rect. An oval (or

circle) is the same. from guizero import App, Drawing app = App() drawing = Drawing(app)

rect_id = drawing.rectangle(10, 10, 60, 60, color="blue") drawing.delete(rect_id)

app.display()

Providing a description and example in the issue text rather than the

title is much more helpful.

Removing bug label. 

—

Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. You are receiving this because you authored the thread.Message ID:

Links:

[1] https://github.com/lawsie/guizero/issues/474#issuecomment-1624837547 [2] https://github.com/notifications/unsubscribe-auth/BAWPYYYA5UB42LZ7YASFJCLXO6WFJANCNFSM6AAAAAA2BMHJTI

martinohanlon commented 1 year ago

You're welcome

martinohanlon commented 1 year ago

Closing