Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
fslpy
Commits
a296e984
Commit
a296e984
authored
8 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
CheckBoxMessageDialog can show a 'hint'
parent
2be67005
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/utils/dialog.py
+15
-1
15 additions, 1 deletion
fsl/utils/dialog.py
with
15 additions
and
1 deletion
fsl/utils/dialog.py
+
15
−
1
View file @
a296e984
...
...
@@ -760,6 +760,7 @@ class CheckBoxMessageDialog(wx.Dialog):
yesText
=
None
,
noText
=
None
,
cancelText
=
None
,
hintText
=
None
,
focus
=
None
,
icon
=
None
,
style
=
None
):
...
...
@@ -785,6 +786,9 @@ class CheckBoxMessageDialog(wx.Dialog):
:arg cancelText: Text to show on the *cancel* button. If not
provided, there will be no cancel button.
:arg hintText: If provided, shown as a
"
hint
"
, in a slightly
faded font, between the checkboxes and the buttons.
:arg focus: One of ``
'
yes
'
``, ``
'
no
'
```, or ``
'
cancel
'
``,
specifying which button should be given initial
focus.
...
...
@@ -843,7 +847,13 @@ class CheckBoxMessageDialog(wx.Dialog):
id
=
wx
.
ID_CANCEL
)
self
.
__cancelButton
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
__onCancelButton
)
else
:
self
.
__cancelButton
=
None
self
.
__cancelButton
=
None
if
hintText
is
not
None
:
self
.
__hint
=
wx
.
StaticText
(
self
,
label
=
hintText
)
self
.
__hint
.
SetForegroundColour
(
'
#888888
'
)
else
:
self
.
__hint
=
None
self
.
__mainSizer
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
self
.
__contentSizer
=
wx
.
BoxSizer
(
wx
.
VERTICAL
)
...
...
@@ -854,6 +864,10 @@ class CheckBoxMessageDialog(wx.Dialog):
for
cb
in
self
.
__checkboxes
:
self
.
__contentSizer
.
Add
(
cb
,
flag
=
wx
.
EXPAND
)
if
self
.
__hint
is
not
None
:
self
.
__contentSizer
.
Add
((
1
,
20
),
flag
=
wx
.
EXPAND
)
self
.
__contentSizer
.
Add
(
self
.
__hint
,
flag
=
wx
.
EXPAND
)
self
.
__contentSizer
.
Add
((
1
,
20
),
flag
=
wx
.
EXPAND
)
self
.
__btnSizer
.
Add
((
1
,
1
),
flag
=
wx
.
EXPAND
,
proportion
=
1
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment