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

Unable to programmatically set button color #172

Closed
clippyb opened this issue Aug 27, 2024 · 3 comments
Closed

Unable to programmatically set button color #172

clippyb opened this issue Aug 27, 2024 · 3 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers solved Problem solved

Comments

@clippyb
Copy link

clippyb commented Aug 27, 2024

Bug explanation

Setting the PressedColor value of a button has no effect, not a massive problem if the button exists in the designer to change it in properties but dynamically changing this within my program does not work
Screenshot 2024-08-27 073236

Version

3.8.0.6

@clippyb clippyb added the bug Something isn't working label Aug 27, 2024
Copy link

We're grateful you made your first issue notification. You can be sure that a response will be made as soon as possible.

@Taiizor Taiizor added the good first issue Good for newcomers label Aug 27, 2024
@clippyb
Copy link
Author

clippyb commented Aug 27, 2024

I was able to fix the issue by modifying the class

public Color PressedColor
{
get => _PressedColor;
set
{
_PressedColor = value;
Invalidate();
}
}

Inserting the following below _PressedColor
PressedGB = new LinearGradientBrush(new Rectangle(0, 0, Width, Height), PressedColor, PressedColor, 90.0F);

Taiizor added a commit that referenced this issue Aug 29, 2024
@Taiizor
Copy link
Owner

Taiizor commented Aug 29, 2024

This issue will be resolved in the next update for the Button component.

@Taiizor Taiizor added the solved Problem solved label Aug 29, 2024
@Taiizor Taiizor closed this as completed Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers solved Problem solved
Projects
None yet
Development

No branches or pull requests

2 participants