Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Data Fields
Lesson1Wx.ComPanel Class Reference
Inheritance diagram for Lesson1Wx.ComPanel:

Public Member Functions

def __init__
 
def ShowGuide
 
def ExecuteCommand
 

Data Fields

 g4comText
 
 g4comExec
 
 comListBox
 
 guide
 

Detailed Description

Definition at line 162 of file Lesson1Wx.py.

Constructor & Destructor Documentation

def Lesson1Wx.ComPanel.__init__ (   self,
  parent 
)

Definition at line 163 of file Lesson1Wx.py.

164  def __init__(self, parent):
165  wx.Panel.__init__(self, parent, -1)
167  self.g4comText = wx.TextCtrl(parent, -1, "enter Command", pos=(10,10), size=(300, 30))
169  self.g4comExec = wx.Button(parent, -1, "Execute", pos=(320,10), size=(60,30))
170  self.g4comExec.Bind(wx.EVT_BUTTON, self.ExecuteCommand, self.g4comExec)
172  self.comListBox = wx.ListBox(parent, -1, pos=(10,50), size=(300,200), choices=commandList, style=wx.LB_SINGLE)
173  self.comListBox.SetSelection(1)
174  self.comListBox.Bind(wx.EVT_LISTBOX, self.ShowGuide, self.comListBox)
175 
176  self.guide = wx.TextCtrl(parent, -1, "guidance", pos=(320,50), size=(300, 200), style =wx.TE_MULTILINE)
177  self.guide.Bind(wx.EVT_LISTBOX, self.ShowGuide, self.guide)
178 

Member Function Documentation

def Lesson1Wx.ComPanel.ExecuteCommand (   self,
  event 
)

Definition at line 185 of file Lesson1Wx.py.

References python.gApplyUICommand.

186  def ExecuteCommand(self, event):
187  gApplyUICommand(str(self.g4comText.GetValue()))
188 
def Lesson1Wx.ComPanel.ShowGuide (   self,
  event 
)

Definition at line 179 of file Lesson1Wx.py.

180  def ShowGuide(self, event):
181  self.guide.Clear() # how to cleat the whole text before showing the next
182  g4com =str(self.comListBox.GetStringSelection())
183  self.guide.WriteText( commandDic[g4com])
184  self.g4comText.SetValue(g4com)

Field Documentation

Lesson1Wx.ComPanel.comListBox

Definition at line 171 of file Lesson1Wx.py.

Lesson1Wx.ComPanel.g4comExec

Definition at line 168 of file Lesson1Wx.py.

Lesson1Wx.ComPanel.g4comText

Definition at line 166 of file Lesson1Wx.py.

Lesson1Wx.ComPanel.guide

Definition at line 175 of file Lesson1Wx.py.


The documentation for this class was generated from the following file: