israel-dryer / ttkbootstrap

A supercharged theme extension for tkinter that enables on-demand modern flat style themes inspired by Bootstrap.
MIT License
1.78k stars 358 forks source link

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

Open Slarag opened 5 months ago

Slarag commented 5 months ago

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