[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/forms/src/uidrivers/win32 ToolBar.py UIdri...
From: |
Bajusz Tamás |
Subject: |
gnue/forms/src/uidrivers/win32 ToolBar.py UIdri... |
Date: |
Sun, 16 Mar 2003 18:57:29 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Bajusz Tamás <address@hidden> 03/03/16 18:57:29
Modified files:
forms/src/uidrivers/win32: ToolBar.py UIdriver.py common.py
forms/src/uidrivers/win32/widgets: _base.py
forms/src/uidrivers/win32/widgets/form: widget.py
Log message:
adding keyboard events
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/win32/ToolBar.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/win32/UIdriver.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/win32/common.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/win32/widgets/_base.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/win32/widgets/form/widget.py.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
Patches:
Index: gnue/forms/src/uidrivers/win32/ToolBar.py
diff -c gnue/forms/src/uidrivers/win32/ToolBar.py:1.6
gnue/forms/src/uidrivers/win32/ToolBar.py:1.7
*** gnue/forms/src/uidrivers/win32/ToolBar.py:1.6 Mon Mar 10 18:15:43 2003
--- gnue/forms/src/uidrivers/win32/ToolBar.py Sun Mar 16 18:57:28 2003
***************
*** 46,56 ****
style, 0, 0, 0, 0,
self.container, getNextId(), hinst)
! win32gui.SendMessage(mainToolBar.GetHwnd(), commctrl.TB_BUTTONSTRUCTSIZE,
12, 0);
! ## win32gui.SendMessage(mainToolBar.GetHwnd(), commctrl.TB_SETBITMAPSIZE,
0, 0x00200020); # 32x32
! ## win32gui.SendMessage(mainToolBar.GetHwnd(), commctrl.TB_SETBUTTONSIZE,
0, 0x00200020); # 32x32
! win32gui.SendMessage(mainToolBar.GetHwnd(), commctrl.TB_SETBITMAPSIZE, 0,
0x00180018); # 24x24
! win32gui.SendMessage(mainToolBar.GetHwnd(), commctrl.TB_SETBUTTONSIZE, 0,
0x00180018); # 24x24
win32gui.SendMessage(mainToolBar.GetHwnd(), commctrl.TB_AUTOSIZE, 0, 0)
self.toolbar.Show()
--- 46,54 ----
style, 0, 0, 0, 0,
self.container, getNextId(), hinst)
! win32gui.SendMessage(mainToolBar.GetHwnd(), commctrl.TB_BUTTONSTRUCTSIZE,
12, 0)
! win32gui.SendMessage(mainToolBar.GetHwnd(), commctrl.TB_SETBITMAPSIZE, 0,
(24<<16) + 24) # 24x24
! win32gui.SendMessage(mainToolBar.GetHwnd(), commctrl.TB_SETBUTTONSIZE, 0,
(24<<16) + 24) # 24x24
win32gui.SendMessage(mainToolBar.GetHwnd(), commctrl.TB_AUTOSIZE, 0, 0)
self.toolbar.Show()
***************
*** 62,68 ****
parent = self.toolbar
label = name
iconloc = userAction.getIconLocation(size="24x24", format="bmp")
- ## iconloc = userAction.getIconLocation(size="32x32", format="ico")
# Set the action icon if available
if iconloc:
--- 60,65 ----
***************
*** 72,78 ****
except KeyError:
try:
hIcon = win32gui.LoadImage(0, iconloc, win32con.IMAGE_BITMAP, 24,
24, win32con.LR_LOADFROMFILE)
- ## hIcon = win32gui.LoadImage(0, iconloc, win32con.IMAGE_ICON, 32, 32,
win32con.LR_LOADFROMFILE) #|win32con.LR_DEFAULTCOLOR)
except:
return
_cachedIcons[iconloc] = hIcon
--- 69,74 ----
***************
*** 94,100 ****
tbb=struct.pack("iiiili", iBitmap, id, commctrl.TBSTATE_ENABLED,
commctrl.TBSTYLE_BUTTON, 0, 0)
win32gui.SendMessage(parent.GetHwnd(), commctrl.TB_ADDBUTTONS, 1, tbb)
! win32gui.SendMessage(parent.GetHwnd(), commctrl.TB_ADDSTRING, 0,
userAction.description or '');
return (parent, id)
--- 90,96 ----
tbb=struct.pack("iiiili", iBitmap, id, commctrl.TBSTATE_ENABLED,
commctrl.TBSTYLE_BUTTON, 0, 0)
win32gui.SendMessage(parent.GetHwnd(), commctrl.TB_ADDBUTTONS, 1, tbb)
! win32gui.SendMessage(parent.GetHwnd(), commctrl.TB_ADDSTRING, 0,
userAction.description or '')
return (parent, id)
Index: gnue/forms/src/uidrivers/win32/UIdriver.py
diff -c gnue/forms/src/uidrivers/win32/UIdriver.py:1.5
gnue/forms/src/uidrivers/win32/UIdriver.py:1.6
*** gnue/forms/src/uidrivers/win32/UIdriver.py:1.5 Thu Mar 13 18:15:14 2003
--- gnue/forms/src/uidrivers/win32/UIdriver.py Sun Mar 16 18:57:28 2003
***************
*** 59,65 ****
def OnWMLButtonDown(hwnd, msg, wParam, lParam, widget):
- print "OnWMLButtonDown hwnd,widget=",hwnd,widget
return win32gui.DefWindowProc(hwnd, msg, wParam, lParam)
def OnWMNotify(hwnd, msg, wParam, lParam, widget):
--- 59,64 ----
***************
*** 159,165 ****
print "GetFullTextExtent",maxWidth,maxHeight,maxDescent,maxLeading
self.textWidth = int(maxWidth+maxLeading) # The pixel width of text
inside a widget
! self.textHeight = int(maxHeight+maxDescent) # The pixel height of text
inside a widget
self.widgetWidth = self.textWidth # The pixel width of a 1
char widget (for things like buttons)
self.widgetHeight = self.textHeight + 3 # The pixel height of a 1
char widget (for things like buttons)
--- 158,164 ----
print "GetFullTextExtent",maxWidth,maxHeight,maxDescent,maxLeading
self.textWidth = int(maxWidth+maxLeading) # The pixel width of text
inside a widget
! self.textHeight = int(maxHeight+maxDescent) + 2 # The pixel height of
text inside a widget
self.widgetWidth = self.textWidth # The pixel width of a 1
char widget (for things like buttons)
self.widgetHeight = self.textHeight + 3 # The pixel height of a 1
char widget (for things like buttons)
Index: gnue/forms/src/uidrivers/win32/common.py
diff -c gnue/forms/src/uidrivers/win32/common.py:1.5
gnue/forms/src/uidrivers/win32/common.py:1.6
*** gnue/forms/src/uidrivers/win32/common.py:1.5 Sun Mar 9 18:08:46 2003
--- gnue/forms/src/uidrivers/win32/common.py Sun Mar 16 18:57:28 2003
***************
*** 219,249 ****
#FIX# action.__dict__.update({'_form':object._form})
#FIX# self._eventProcessor(action)
-
- #####################################################################
- ##
- ## Keymapper Support
- ##
- #####################################################################
- from gnue.forms import GFKeyMapper
- from gnue.forms.GFKeyMapper import vk
-
- # Translate from Win32 keystrokes to our virtual keystrokes
- win32KeyTranslations = {
- vk.F1 : VK_F1, vk.F2 : VK_F2,
- vk.F3 : VK_F3, vk.F4 : VK_F4,
- vk.F5 : VK_F5, vk.F6 : VK_F6,
- vk.F7 : VK_F7, vk.F8 : VK_F8,
- vk.F9 : VK_F9, vk.F10 : VK_F10,
- vk.F11 : VK_F11, vk.F12 : VK_F12,
- vk.INSERT : VK_INSERT, vk.DELETE : VK_DELETE,
- vk.HOME : VK_HOME, vk.END : VK_END,
- vk.PAGEUP : VK_PRIOR, vk.PAGEDOWN : VK_NEXT,
- vk.UP : VK_UP, vk.DOWN : VK_DOWN,
- vk.LEFT : VK_LEFT, vk.RIGHT : VK_RIGHT,
- vk.TAB : VK_TAB,
- vk.ENTER : VK_RETURN, vk.BACKSPACE : VK_BACK }
-
- GFKeyMapper.KeyMapper.setUIKeyMap(win32KeyTranslations)
-
--- 219,222 ----
Index: gnue/forms/src/uidrivers/win32/widgets/_base.py
diff -c gnue/forms/src/uidrivers/win32/widgets/_base.py:1.5
gnue/forms/src/uidrivers/win32/widgets/_base.py:1.6
*** gnue/forms/src/uidrivers/win32/widgets/_base.py:1.5 Thu Mar 13 18:15:36 2003
--- gnue/forms/src/uidrivers/win32/widgets/_base.py Sun Mar 16 18:57:28 2003
***************
*** 35,41 ****
from gnue.forms.GFForm import *
from gnue.forms.uidrivers._base.widgets._base import *
! from gnue.forms.uidrivers.win32.common import *
#TCN_SELCHANGE = (commctrl.TCN_FIRST - 1)
--- 35,41 ----
from gnue.forms.GFForm import *
from gnue.forms.uidrivers._base.widgets._base import *
! from gnue.forms.uidrivers.win32.common import initFont
#TCN_SELCHANGE = (commctrl.TCN_FIRST - 1)
***************
*** 64,72 ****
uidriver._IdToTkObj[self._hwnd] = self
if type(className) == StringType: # STATIC BUTTON COMBOBOX EDIT
! self.Show()
print windowTitle,className,self._id,self._hwnd
!
def SetFont(self,font):
self._PyCWnd.SetFont(font,1)
--- 64,190 ----
uidriver._IdToTkObj[self._hwnd] = self
if type(className) == StringType: # STATIC BUTTON COMBOBOX EDIT
! self.Show()
! # i don't know how to get the adress of a wndproc func
! # for global subclassing with
! # win32con.SetClassLong(hwnd, win32con.GCL_WNDPROC , wndproc)
! # so make instance subclassing (win32 terminology !)
! self._oldWndProc = win32gui.SetWindowLong(self._hwnd,
win32con.GWL_WNDPROC, self._wndproc)
print windowTitle,className,self._id,self._hwnd
!
! def _wndproc(self, hwnd, msg, wParam, lParam):
! if msg == win32con.WM_KEYDOWN:
! keycode = wParam
! if keycode in NOT_WM_CHAR_KEYS:
! object = self._uiDriver._IdToGFObj[self._id]
! action = None
!
! ShiftDown = (win32api.GetKeyState(win32con.VK_SHIFT) & 0x8000) and 1
or 0
! ControlDown = (win32api.GetKeyState(win32con.VK_CONTROL) & 0x8000)
and 1 or 0
! AltDown = (win32api.GetKeyState(win32con.VK_MENU) & 0x8000) and 1 or 0
! print "keydown in subclassed",keycode,ShiftDown,ControlDown,AltDown
!
! command = GFKeyMapper.KeyMapper.getEvent(
! keycode,
! ShiftDown,
! ControlDown,
! AltDown)
!
! if command:
! action = events.Event('request%s' % command)
!
! # Add the object's _form to the outgoing event
! # rather than every event in the function
! action.__dict__.update({'_form':object._form})
! uiobject = self._uiDriver._IdToUIObj[self._id]
! uiobject._eventHandler(action)
! else:
! return win32gui.CallWindowProc(self._oldWndProc, hwnd, msg, wParam,
lParam)
!
! elif msg == win32con.WM_CHAR:
! # The TranslateMessage function generates a WM_CHAR message
! # when the user presses any of the following keys:
! # Any character key
! # backspace
! # enter (carriage return)
! # esc
! # shift+enter (linefeed)
! # tab
!
! object = self._uiDriver._IdToGFObj[self._id]
! action = None
!
! keycode = wParam
!
! ShiftDown = (win32api.GetKeyState(win32con.VK_SHIFT) & 0x8000) and 1 or 0
! ControlDown = (win32api.GetKeyState(win32con.VK_CONTROL) & 0x8000) and
1 or 0
! AltDown = (win32api.GetKeyState(win32con.VK_MENU) & 0x8000) and 1 or 0
! print "keydown in subclassed",keycode,ShiftDown,ControlDown,AltDown
!
! #
! # Sigh... a hack for using <enter> in multiline entries
! #
! if keycode == 13 and \
! not ShiftDown and \
! not ControlDown and \
! not AltDown and \
! int (gConfigForms('enterIsNewLine')) and \
! (hasattr(object,'Char__height') and object.Char__height) > 1:
!
! command = 'NEWLINE'
!
! else:
!
!
! #
! # Get the event to process from the KeyMapper
! #
! command = GFKeyMapper.KeyMapper.getEvent(
! keycode,
! ShiftDown,
! ControlDown,
! AltDown)
! print "command=",command
! if command == 'NEWLINE':
! action = events.Event('requestKEYPRESS', '\n',
! text='\n',
! code=10)
!
! elif command and not keycode in NOT_WM_CHAR_KEYS:
! action = events.Event('request%s' % command)
!
! elif object._type == 'GFButton':
! action = events.Event('buttonActivated',object)
!
! elif object.style == 'checkbox' and object._type == 'GFEntry':
! # <space> <=> <click>
! if keycode == 32:
! action = events.Event('requestTOGGLECHKBOX')
! else:
! # maybe some background error message here
! pass
! else:
! try:
! char = chr(keycode)
! if char in string.printable or char == "\n" or \
! 128 <= keycode <= 255:
! action = events.Event('requestKEYPRESS', char,
! text=char,
! code=keycode)
! print "char=", char
! except ValueError:
! pass
!
! if action:
! # Add the object's _form to the outgoing event
! # rather than every event in the function
! action.__dict__.update({'_form':object._form})
! uiobject = self._uiDriver._IdToUIObj[self._id]
! uiobject._eventHandler(action)
!
! else:
! return win32gui.CallWindowProc(self._oldWndProc, hwnd, msg, wParam,
lParam)
!
def SetFont(self,font):
self._PyCWnd.SetFont(font,1)
***************
*** 92,98 ****
return self._children
def SetFocus(self):
! win32gui.SendMessage(self._hwnd, win32con.WM_SETFOCUS, 0, 0)
def Enable(self, enabled):
if enabled:
--- 210,222 ----
return self._children
def SetFocus(self):
! win32gui.SetFocus(self._hwnd)
!
! def setCursorPosition(self, position):
! win32gui.SendMessage(self._hwnd, win32con.EM_SETSEL, position, position)
!
! def setSelectedArea(self, selection1, selection2):
! win32gui.SendMessage(self._hwnd, win32con.EM_SETSEL, selection1,
selection2)
def Enable(self, enabled):
if enabled:
***************
*** 120,142 ****
def OnWMSize(self, hwnd, msg, wParam, lParam):
for child in self._children:
if child._className == commctrl.STATUSCLASSNAME:
! hStatusbar = win32gui.GetDlgItem(hwnd, child._id);
(left, top, right, bottom) = win32gui.GetClientRect(hwnd)
x = right - left
statwidths =
struct.pack("iiiii",x-75-75-50-50,x-75-75-50,x-75-75,x-75,x)
win32gui.SendMessage(hStatusbar, commctrl.SB_SETPARTS, 5, statwidths)
! win32gui.SendMessage(hStatusbar, win32con.WM_SIZE, 0, 0);
elif child._className == commctrl.TOOLBARCLASSNAME:
! hToolbar = win32gui.GetDlgItem(hwnd, child._id);
win32gui.SendMessage(hToolbar, commctrl.TB_AUTOSIZE, 0, 0)
def OnWMCommand(self, hwnd, msg, wParam, lParam):
! print "OnWMCommand Win32Window hwnd=", hwnd
self._connectTable[wParam]()
def OnWMNotify(self, hwnd, msg, wParam, lParam):
! print "OnWMNotify Win32Window", hwnd, msg, wParam, lParam
format = "iiiiiiiiiii"
buf = win32gui.PyMakeBuffer(struct.calcsize(format), lParam)
hwndFrom, idFrom, code, iItem, iSubItem, uNewState, uOldState, uChanged,
actionx, actiony, lparam \
--- 244,269 ----
def OnWMSize(self, hwnd, msg, wParam, lParam):
for child in self._children:
+ # resizing statusbar as needed
if child._className == commctrl.STATUSCLASSNAME:
! hStatusbar = win32gui.GetDlgItem(hwnd, child._id)
(left, top, right, bottom) = win32gui.GetClientRect(hwnd)
x = right - left
statwidths =
struct.pack("iiiii",x-75-75-50-50,x-75-75-50,x-75-75,x-75,x)
win32gui.SendMessage(hStatusbar, commctrl.SB_SETPARTS, 5, statwidths)
! win32gui.SendMessage(hStatusbar, win32con.WM_SIZE, 0, 0)
! # and toolbar too
elif child._className == commctrl.TOOLBARCLASSNAME:
! hToolbar = win32gui.GetDlgItem(hwnd, child._id)
win32gui.SendMessage(hToolbar, commctrl.TB_AUTOSIZE, 0, 0)
def OnWMCommand(self, hwnd, msg, wParam, lParam):
! ###print "OnWMCommand Win32Window hwnd=", hwnd
! # menu/toolbar selection happend
self._connectTable[wParam]()
def OnWMNotify(self, hwnd, msg, wParam, lParam):
! # handling tabbed pages
format = "iiiiiiiiiii"
buf = win32gui.PyMakeBuffer(struct.calcsize(format), lParam)
hwndFrom, idFrom, code, iItem, iSubItem, uNewState, uOldState, uChanged,
actionx, actiony, lparam \
***************
*** 154,160 ****
class Win32Entry(Win32Base):
def OnWMCommand(self, hwnd, msg, wParam, lParam):
! print "OnWMCommand Win32Entry", hwnd, msg, wParam, lParam
return win32gui.DefWindowProc(hwnd, msg, wParam, lParam)
def SetValue(self, value):
--- 281,287 ----
class Win32Entry(Win32Base):
def OnWMCommand(self, hwnd, msg, wParam, lParam):
! ###print "OnWMCommand Win32Entry", hwnd, msg, wParam, lParam
return win32gui.DefWindowProc(hwnd, msg, wParam, lParam)
def SetValue(self, value):
***************
*** 190,196 ****
class Win32Button(Win32Base):
def OnWMCommand(self, hwnd, msg, wParam, lParam):
! print 'OnWMCommand in Win32Button', hwnd, msg, wParam, lParam
print self._connectTable[wParam]
self._connectTable[wParam](wParam)
--- 317,323 ----
class Win32Button(Win32Base):
def OnWMCommand(self, hwnd, msg, wParam, lParam):
! ###print 'OnWMCommand in Win32Button', hwnd, msg, wParam, lParam
print self._connectTable[wParam]
self._connectTable[wParam](wParam)
***************
*** 198,204 ****
class Win32Page(Win32Base):
def OnWMCommand(self, hwnd, msg, wParam, lParam):
! print "OnWMCommand Win32Page", hwnd, msg, wParam, lParam
window = self._uiDriver._IdToTkObj[lParam]
window.OnWMCommand(hwnd, msg, wParam, lParam)
--- 325,331 ----
class Win32Page(Win32Base):
def OnWMCommand(self, hwnd, msg, wParam, lParam):
! ###print "OnWMCommand Win32Page", hwnd, msg, wParam, lParam
window = self._uiDriver._IdToTkObj[lParam]
window.OnWMCommand(hwnd, msg, wParam, lParam)
***************
*** 254,264 ****
def indexedFocus(self, index):
! pass
! # print "self.widgets[index]=",self.widgets,
! # print self.widgets[index], index, self.widgets[index].GetValue()
! # TODO
! # self.widgets[index].SetFocus()
def setValue(self, value, index=0, enabled=1):
# These must be here or dropdown style controls
--- 381,387 ----
def indexedFocus(self, index):
! self.widgets[index].SetFocus()
def setValue(self, value, index=0, enabled=1):
# These must be here or dropdown style controls
***************
*** 299,308 ****
def setCursorPosition(self, position, index=0):
! pass
def setSelectedArea(self, selection1, selection2, index=0):
! pass
def createWidget(self, event, spacer):
print "creating:",event.object
--- 422,431 ----
def setCursorPosition(self, position, index=0):
! self.widgets[index].setCursorPosition(position)
def setSelectedArea(self, selection1, selection2, index=0):
! self.widgets[index].setSelectedArea(selection1, selection2)
def createWidget(self, event, spacer):
print "creating:",event.object
***************
*** 319,321 ****
--- 442,495 ----
del self._uiDriver._IdToUIObj[id]
self.widgets.pop(0)
self._deleteFromCrossRef(widget, object)
+
+
+ #####################################################################
+ ##
+ ## Keymapper Support
+ ##
+ #####################################################################
+ from gnue.forms import GFKeyMapper
+ from gnue.forms.GFKeyMapper import vk
+
+ # Translate from Win32 keystrokes to our virtual keystrokes
+ win32KeyTranslations = {
+ vk.F1 : win32con.VK_F1, vk.F2 : win32con.VK_F2,
+ vk.F3 : win32con.VK_F3, vk.F4 : win32con.VK_F4,
+ vk.F5 : win32con.VK_F5, vk.F6 : win32con.VK_F6,
+ vk.F7 : win32con.VK_F7, vk.F8 : win32con.VK_F8,
+ vk.F9 : win32con.VK_F9, vk.F10 : win32con.VK_F10,
+ vk.F11 : win32con.VK_F11, vk.F12 : win32con.VK_F12,
+ vk.INSERT : win32con.VK_INSERT, vk.DELETE : win32con.VK_DELETE,
+ vk.HOME : win32con.VK_HOME, vk.END : win32con.VK_END,
+ vk.PAGEUP : win32con.VK_PRIOR, vk.PAGEDOWN : win32con.VK_NEXT,
+ vk.UP : win32con.VK_UP, vk.DOWN : win32con.VK_DOWN,
+ vk.LEFT : win32con.VK_LEFT, vk.RIGHT : win32con.VK_RIGHT,
+ vk.TAB : win32con.VK_TAB,
+ vk.ENTER : win32con.VK_RETURN, vk.BACKSPACE : win32con.VK_BACK }
+
+ GFKeyMapper.KeyMapper.setUIKeyMap(win32KeyTranslations)
+
+ NOT_WM_CHAR_KEYS =[
+ win32con.VK_HOME,
+ win32con.VK_END,
+ win32con.VK_UP,
+ win32con.VK_DOWN,
+ win32con.VK_RIGHT,
+ win32con.VK_LEFT,
+ win32con.VK_INSERT,
+ win32con.VK_DELETE,
+ win32con.VK_PRIOR,
+ win32con.VK_NEXT,
+ win32con.VK_F1,
+ win32con.VK_F2,
+ win32con.VK_F3,
+ win32con.VK_F4,
+ win32con.VK_F5,
+ win32con.VK_F6,
+ win32con.VK_F7,
+ win32con.VK_F8,
+ win32con.VK_F9,
+ win32con.VK_F10,
+ win32con.VK_F11,
+ win32con.VK_F12]
\ No newline at end of file
Index: gnue/forms/src/uidrivers/win32/widgets/form/widget.py
diff -c gnue/forms/src/uidrivers/win32/widgets/form/widget.py:1.8
gnue/forms/src/uidrivers/win32/widgets/form/widget.py:1.9
*** gnue/forms/src/uidrivers/win32/widgets/form/widget.py:1.8 Mon Mar 10
10:58:09 2003
--- gnue/forms/src/uidrivers/win32/widgets/form/widget.py Sun Mar 16
18:57:28 2003
***************
*** 144,166 ****
# Makes the requested page visible while hiding the others
#
def gotoPage(self,event):
- print "gotoPage event=",event
self._wrapper.setPage(self._uiDriver._gfObjToUIWidget[event.data].widgets[0])
! if not self._notebook:
! for page in self._uiPageList:
! if page != uiPage:
! page.hide()
! else:
! page.show()
! else:
# uiPage widgets only contain 1 item
! pageId = uiPage.widgets[0].GetId()
! for count in range(self._notebook.GetPageCount()):
! if pageId == self._notebook.GetPage(count).GetId():
! self._notebook.SetSelection(count)
#
--- 144,166 ----
# Makes the requested page visible while hiding the others
#
def gotoPage(self,event):
self._wrapper.setPage(self._uiDriver._gfObjToUIWidget[event.data].widgets[0])
+ print "gotoPage event=",event
! # if not self._notebook:
! # for page in self._uiPageList:
! # if page != uiPage:
! # page.hide()
! # else:
! # page.show()
! # else:
# uiPage widgets only contain 1 item
! # pageId = uiPage.widgets[0].GetId()
! # for count in range(self._notebook.GetPageCount()):
! # if pageId == self._notebook.GetPage(count).GetId():
! # self._notebook.SetSelection(count)
#
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/forms/src/uidrivers/win32 ToolBar.py UIdri...,
Bajusz Tamás <=