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

How to set background for a frame #26

Closed
john157157 opened this issue Feb 11, 2022 · 2 comments
Closed

How to set background for a frame #26

john157157 opened this issue Feb 11, 2022 · 2 comments

Comments

@john157157
Copy link

john157157 commented Feb 11, 2022

For widgets that don't have background color as a NativeAttribute, like for instance Frames, how can that be set?

@52LY
Copy link

52LY commented Feb 12, 2022

Give it a try, I'm not sure if this will solve your problem.

mw := tk.RootWindow()
frame := tk.NewFrame(mw, tk.WidgetAttrInitUseTheme(false)) // use tk::frame, default : use ttk::frame
frame.SetNativeAttribute("background", "black")

@john157157
Copy link
Author

tk.WidgetAttrInitUseTheme(false) is the magic sauce. I'm back in business. Thank you so much!

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

2 participants