Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

이벤트 함수 안에 값을 다른 변수에 저장하고 싶어요( I want to save the value to another variable inside the event function.) #1162

Open
sjune843 opened this issue Oct 27, 2023 · 0 comments

Comments

@sjune843
Copy link

해결하고자 하는 문제

이벤트 함수 안에 있는 글로벌 변수안의 값을 함수 밖의 또다른 변수에 저장하고 싶어요.
I want to save the value in the global variable inside the event function to another variable outside the function.

코드 혹은 오류

   여기에 코드를 적어주세요. 

def coordinate(event):
fx = event.x
fy = event.y

global sx
global sy
sx = fx
sy = fy
print (sx,sy)

return sx,sy    

canvas.bind("", start_point,add='')
canvas.bind("", coordinate,add='')

환경

사용중인 운영체제, 언어, 라이브러리의 버전을 적어주세요.
vscode - python

시도해본 방법

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant