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

Public Member Functions

def __init__
 
def ChangeColor
 

Detailed Description

Definition at line 299 of file Lesson2Wx.py.

Constructor & Destructor Documentation

def Lesson2Wx.MyText.__init__ (   self,
  parent,
  Text 
)

Definition at line 300 of file Lesson2Wx.py.

References Lesson1Wx.MyText.ChangeColor(), and Lesson2Wx.MyText.ChangeColor().

301  def __init__(self, parent, Text):
302  wx.StaticText.__init__(self, parent, -1, Text, pos=(20,20))
303  self.Bind(wx.EVT_LEFT_UP, self.ChangeColor)

Member Function Documentation

def Lesson2Wx.MyText.ChangeColor (   self,
  event 
)

Definition at line 304 of file Lesson2Wx.py.

References G4NeutronHPList.SetLabel(), and G4NeutronHPVector.SetLabel().

Referenced by Lesson2Wx.MyText.__init__().

305  def ChangeColor(self, event):
306  TheColour = self.GetForegroundColour()
307  if TheColour == (0,0,0):
308  self.SetLabel("Simulation is running!")
309  self.SetForegroundColour("red")
310  else:
311  self.SetLabel("Click me to start a run")
312  self.SetForegroundColour("black")
313 
314 # to be used to choose materials and particles
315 # myList is a list of keys() of a dictionary
# f.e., materials are Python objects with their names as their keys

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