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

kwarg paramter "default" of Messagbox methods is ignored #525

Open
Slarag opened this issue Jan 12, 2024 · 0 comments · May be fixed by #527
Open

kwarg paramter "default" of Messagbox methods is ignored #525

Slarag opened this issue Jan 12, 2024 · 0 comments · May be fixed by #527
Labels
bug Something isn't working

Comments

@Slarag
Copy link

Slarag commented Jan 12, 2024

Desktop (please complete the following information):

ttkbootstrap Version: 1.10.1
OS: Independet

Describe the bug

kwarg paramter "default" of Messagbox methods is ignored. Parameter does not change which button is initially focused .

To Reproduce

  1. Run the following code:
import ttkbootstrap as ttk
ttkbootstrap.dialogs.Messagebox.yesnocancel('', default='No')
  1. The Yes button is focused instead of the No button
  2. Pressing the Space key will return 'Yes'

Expected behavior

Initial focus should be set to the desired default. Button style (primary, secondary) should be based on the default parameter, if specified.

Screenshots

No response

Additional context

No response

@Slarag Slarag added the bug Something isn't working label Jan 12, 2024
Slarag added a commit to Slarag/ttkbootstrap that referenced this issue Jan 12, 2024
Fixes:
 - Value of the default button is now porperly respected (fix israel-dryer#525)
 - Fixed key bindings for Enter key (fix israel-dryer#526)

 New Features:
 - Add support for left/right arrow keys to select an answer
 - Automatic format selection based on the default (proposed as part of israel-dryer#525
@Slarag Slarag linked a pull request Jan 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant