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

There is an issue with multiple buttons on one form #13

Open
leonid1812 opened this issue Feb 13, 2025 · 0 comments
Open

There is an issue with multiple buttons on one form #13

leonid1812 opened this issue Feb 13, 2025 · 0 comments

Comments

@leonid1812
Copy link

Hello,

It is a good library, but for some reason it doesn't work well for me when I try to color multiple buttons on the page at once. Only the last button gets colored, while the others remain white. However, if I hover the mouse cursor over a button, it gets colored in the specified color. I have the latest version of AutoHotkey v2 installed.

Example of my code:
SubmitButton := MainForm.Add("Button", "x200 y595 w90 h30 Hidden", "✔️ Submit") ; Hidden
SubmitButton.SetColor(WindowsButtonColor, "0x000000", -1, "BABABA", 9)
SubmitButton.OnEvent("Click", SubmitButton_action)

CopyButton := MainForm.Add("Button", "x+10 yp w90 h30", "📄 Copy")
CopyButton.SetColor(WindowsButtonColor, "0x000000", -1, "BABABA", 9)
CopyButton.OnEvent("Click", CopyButton_action)
CopyButton.Redraw()

ReplaceButton := MainForm.Add("Button", "x+10 yp w90 h30", "✏️ Replace")
ReplaceButton.SetColor(WindowsButtonColor, "0x000000", -1, "BABABA", 9)
ReplaceButton.OnEvent("Click", ReplaceButton_action)
ReplaceButton.Redraw()

ExitButton := MainForm.Add("Button", "x+10 w90 h30", "🡆 Exit")
ExitButton.SetColor(WindowsButtonColor, "0x000000", -1, "BABABA", 9)
ExitButton.OnEvent("Click", MainForm_Exit) ; Close application UI
CopyButton.Redraw()

Result:
Image

After OnMouse hover:
Image

I tried to redraw the buttons, but this did not help.
CopyButton.Redraw()

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