@@ -79,39 +79,41 @@ def __init__(self, parent, title, _htest=False, _utest=False):
7979 def CreateWidgets (self ):
8080 self .tabPages = TabbedPageSet (self ,
8181 page_names = ['Fonts/Tabs' , 'Highlighting' , 'Keys' , 'General' ])
82- frameActionButtons = Frame (self , pady = 2 )
83- #action buttons
82+ self .tabPages .pack (side = TOP , expand = TRUE , fill = BOTH )
83+ self .CreatePageFontTab ()
84+ self .CreatePageHighlight ()
85+ self .CreatePageKeys ()
86+ self .CreatePageGeneral ()
87+ self .create_action_buttons ().pack (side = BOTTOM )
88+ Frame (self , height = 2 , borderwidth = 0 ).pack (side = BOTTOM )
89+
90+ def create_action_buttons (self ):
8491 if macosxSupport .isAquaTk ():
8592 # Changing the default padding on OSX results in unreadable
8693 # text in the buttons
8794 paddingArgs = {}
8895 else :
8996 paddingArgs = {'padx' :6 , 'pady' :3 }
9097
91- # Comment out button creation and packing until implement self.Help
92- ## self.buttonHelp = Button(frameActionButtons, text='Help',
93- ## command=self.Help, takefocus=FALSE,
94- ## **paddingArgs)
98+ frame = Frame (self , pady = 2 )
9599 self .buttonOk = Button (
96- frameActionButtons , text = 'Ok' ,
97- command = self . Ok , takefocus = FALSE , ** paddingArgs )
100+ frame , text = 'Ok' , command = self . Ok ,
101+ takefocus = FALSE , ** paddingArgs )
98102 self .buttonApply = Button (
99- frameActionButtons , text = 'Apply' ,
100- command = self . Apply , takefocus = FALSE , ** paddingArgs )
103+ frame , text = 'Apply' , command = self . Apply ,
104+ takefocus = FALSE , ** paddingArgs )
101105 self .buttonCancel = Button (
102- frameActionButtons , text = 'Cancel' ,
103- command = self . Cancel , takefocus = FALSE , ** paddingArgs )
104- self .CreatePageFontTab ()
105- self .CreatePageHighlight ()
106- self .CreatePageKeys ()
107- self . CreatePageGeneral ( )
106+ frame , text = 'Cancel' , command = self . Cancel ,
107+ takefocus = FALSE , ** paddingArgs )
108+ # Comment out Help button creation and packing until implement self.Help
109+ ## self.buttonHelp = Button(
110+ ## frame, text='Help', command= self.Help,
111+ ## takefocus=FALSE, **paddingArgs )
108112## self.buttonHelp.pack(side=RIGHT, padx=5)
109113 self .buttonOk .pack (side = LEFT , padx = 5 )
110114 self .buttonApply .pack (side = LEFT , padx = 5 )
111115 self .buttonCancel .pack (side = LEFT , padx = 5 )
112- frameActionButtons .pack (side = BOTTOM )
113- Frame (self , height = 2 , borderwidth = 0 ).pack (side = BOTTOM )
114- self .tabPages .pack (side = TOP , expand = TRUE , fill = BOTH )
116+ return frame
115117
116118 def CreatePageFontTab (self ):
117119 parent = self .parent
0 commit comments