You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think the Frame widget has a way to achieve that using its constructor.
However, the Frame class is defined in src/prompt_toolkit/widgets/base.py .
It's only 96 lines long and pretty easy to understand. You could either subclass it and override the "top_row_with_title" attribute, or just copy and paste the class and modify it to your liking.
I will probably do the same at some point because I want to be able to change the border characters to use double borders, which also isn't supported with the builtin widget. The thin border characters are hard-coded at the module level.
Activity
BrooksPettit commentedon Dec 4, 2025
I don't think the Frame widget has a way to achieve that using its constructor.
However, the Frame class is defined in src/prompt_toolkit/widgets/base.py .
It's only 96 lines long and pretty easy to understand. You could either subclass it and override the "top_row_with_title" attribute, or just copy and paste the class and modify it to your liking.
I will probably do the same at some point because I want to be able to change the border characters to use double borders, which also isn't supported with the builtin widget. The thin border characters are hard-coded at the module level.