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

Public Member Functions

def __init__
 
def ShowGuide
 
def ExecuteCommand
 

Data Fields

 g4comText
 
 g4comExec
 
 comListBox
 
 guide
 

Detailed Description

Definition at line 170 of file Lesson2Wx.py.

Constructor & Destructor Documentation

def Lesson2Wx.ComPanel.__init__ (   self,
  parent 
)

Definition at line 171 of file Lesson2Wx.py.

172  def __init__(self, parent):
173  wx.Panel.__init__(self, parent, -1)
175  self.g4comText = wx.TextCtrl(parent, -1, "enter Command", pos=(10,10), size=(300, 30))
176  self.g4comExec = wx.Button(parent, -1, "Execute", pos=(320,10), size=(60,30))
177  self.g4comExec.Bind(wx.EVT_BUTTON, self.ExecuteCommand, self.g4comExec)
178 # self.sizerE = wx.BoxSizer(wx.HORIZONTAL)
179 # self.sizerE.Add(self.g4comText)
180 # self.sizerE.Add(self.g4comExec)
181 
182 # self.sizerL = wx.BoxSizer(wx.HORIZONTAL)
183  self.comListBox = wx.ListBox(parent, -1, pos=(10,50), size=(300,200), choices=commandList, style=wx.LB_SINGLE)
184  self.comListBox.SetSelection(1)
185  self.comListBox.Bind(wx.EVT_LISTBOX, self.ShowGuide, self.comListBox)
186 # self.sizerL.Add(self.comListBox)
188  self.guide = wx.TextCtrl(parent, -1, "guidance", pos=(320,50), size=(300, 200), style =wx.TE_MULTILINE)
189  self.guide.Bind(wx.EVT_LISTBOX, self.ShowGuide, self.guide)
190 
191 # self.sizerL.Add(self.guide)
192 # self.sizer = wx.BoxSizer(wx.VERTICAL)
193 # self.sizer.Add(self.sizerE)
194 # self.sizer.Add(self.sizerL)
195 # self.SetSizer(self.sizer)

Member Function Documentation

def Lesson2Wx.ComPanel.ExecuteCommand (   self,
  event 
)

Definition at line 202 of file Lesson2Wx.py.

References python.gApplyUICommand.

203  def ExecuteCommand(self, event):
204  gApplyUICommand(str(self.g4comText.GetValue()))
def Lesson2Wx.ComPanel.ShowGuide (   self,
  event 
)

Definition at line 196 of file Lesson2Wx.py.

197  def ShowGuide(self, event):
198  self.guide.Clear() # how to cleat the whole text before showing the next
199  g4com =str(self.comListBox.GetStringSelection())
200  self.guide.WriteText( commandDic[g4com])
201  self.g4comText.SetValue(g4com)

Field Documentation

Lesson2Wx.ComPanel.comListBox

Definition at line 182 of file Lesson2Wx.py.

Lesson2Wx.ComPanel.g4comExec

Definition at line 175 of file Lesson2Wx.py.

Lesson2Wx.ComPanel.g4comText

Definition at line 174 of file Lesson2Wx.py.

Lesson2Wx.ComPanel.guide

Definition at line 187 of file Lesson2Wx.py.


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