Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
c47aa9d2
Commit
c47aa9d2
authored
Nov 11, 2015
by
eric pellegrini
Browse files
Added the press Return event for instrument settings dialog
parent
9ea71de9
Changes
2
Hide whitespace changes
Inline
Side-by-side
MDANSE/Framework/Widgets/FloatWidget.py
View file @
c47aa9d2
...
...
@@ -44,7 +44,7 @@ class FloatWidget(StringWidget):
sizer
=
wx
.
BoxSizer
(
wx
.
VERTICAL
)
self
.
_float
=
wx
.
TextCtrl
(
self
.
_widgetPanel
,
wx
.
ID_ANY
,
value
=
str
(
self
.
_configurator
.
default
))
self
.
_float
=
wx
.
TextCtrl
(
self
.
_widgetPanel
,
wx
.
ID_ANY
,
value
=
str
(
self
.
_configurator
.
default
)
,
style
=
wx
.
TE_PROCESS_ENTER
)
sizer
.
Add
(
self
.
_float
,
0
,
wx
.
ALL
,
5
)
...
...
@@ -58,3 +58,8 @@ class FloatWidget(StringWidget):
raise
ConfigurationError
(
"Invalid value for %r entry"
%
self
.
name
)
else
:
return
val
@
property
def
widget
(
self
):
return
self
.
_float
\ No newline at end of file
MDANSE/Framework/Widgets/InstrumentResolutionWidget.py
View file @
c47aa9d2
...
...
@@ -112,7 +112,7 @@ class InstrumentResolutionDialog(wx.Dialog):
self
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
on_ok
,
self
.
_ok
)
self
.
Bind
(
wx
.
EVT_CHOICE
,
self
.
on_select_kernel
,
self
.
_kernelChoice
)
self
.
Bind
(
wx
.
EVT_CLOSE
,
self
.
on_cancel
)
@
property
def
value
(
self
):
...
...
@@ -172,6 +172,8 @@ class InstrumentResolutionDialog(wx.Dialog):
self
.
Freeze
()
self
.
_parametersPanel
=
ConfigurationPanel
(
self
,
resolution
)
for
w
in
self
.
_parametersPanel
.
widgets
.
values
():
self
.
Bind
(
wx
.
EVT_TEXT_ENTER
,
self
.
on_plot_kernel
,
w
.
widget
)
self
.
_parametersSizer
.
Add
(
self
.
_parametersPanel
,
0
,
wx
.
ALL
|
wx
.
EXPAND
,
5
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment