亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sheet.py

?? Wxpython Implemented on Windows CE, Source code
?? PY
?? 第 1 頁 / 共 2 頁
字號(hào):
# sheet.py
# CSheet - A wxPython spreadsheet class.
# This is free software.  Feel free to adapt it as you like.
# Author: Mark F. Russo (russomf@hotmail.com) 2002/01/31
#---------------------------------------------------------------------------
# 12/11/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o 2.5 compatability update.
# o Untested.
#

import  string
import  wx
import  wx.grid

#---------------------------------------------------------------------------
class CTextCellEditor(wx.TextCtrl):
    """ Custom text control for cell editing """
    def __init__(self, parent, id, grid):
        wx.TextCtrl.__init__(self, parent, id, "", style=wx.NO_BORDER)
        self._grid = grid                           # Save grid reference
        self.Bind(wx.EVT_CHAR, self.OnChar)

    def OnChar(self, evt):                          # Hook OnChar for custom behavior
        """Customizes char events """
        key = evt.GetKeyCode()
        if   key == wx.WXK_DOWN:
            self._grid.DisableCellEditControl()     # Commit the edit
            self._grid.MoveCursorDown(False)        # Change the current cell
        elif key == wx.WXK_UP:
            self._grid.DisableCellEditControl()     # Commit the edit
            self._grid.MoveCursorUp(False)          # Change the current cell
        elif key == wx.WXK_LEFT:
            self._grid.DisableCellEditControl()     # Commit the edit
            self._grid.MoveCursorLeft(False)        # Change the current cell
        elif key == wx.WXK_RIGHT:
            self._grid.DisableCellEditControl()     # Commit the edit
            self._grid.MoveCursorRight(False)       # Change the current cell

        evt.Skip()                                  # Continue event

#---------------------------------------------------------------------------
class CCellEditor(wx.grid.PyGridCellEditor):
    """ Custom cell editor """
    def __init__(self, grid):
        wx.grid.PyGridCellEditor.__init__(self)
        self._grid = grid                           # Save a reference to the grid

    def Create(self, parent, id, evtHandler):
        """ Create the actual edit control.  Must derive from wxControl.
            Must Override
        """
        self._tc = CTextCellEditor(parent, id, self._grid)
        self._tc.SetInsertionPoint(0)
        self.SetControl(self._tc)
        if evtHandler:
            self._tc.PushEventHandler(evtHandler)

    def SetSize(self, rect):
        """ Position/size the edit control within the cell rectangle. """
        # Size text control to exactly overlay in-cell editing
        self._tc.SetDimensions(rect.x+3, rect.y+3, rect.width-2, rect.height-2)

    def Show(self, show, attr):
        """ Show or hide the edit control.  Use the attr (if not None)
            to set colors or fonts for the control.

            NOTE: There is no need to everride this if you don't need
            to do something out of the ordinary.
        """
        super(CCellEditor, self).Show(show, attr)

    def PaintBackground(self, rect, attr):
        """ Draws the part of the cell not occupied by the edit control.  The
            base class version just fills it with background colour from the
            attribute.

            NOTE: There is no need to everride this if you don't need
            to do something out of the ordinary.
        """
        # Call base class method.
        super(CCellEditor, self).PaintBackground(self, rect, attr)

    def BeginEdit(self, row, col, grid):
        """ Fetch the value from the table and prepare edit control to begin editing.
            Set the focus to the edit control.  Must Override.
        """
        self._startValue = grid.GetTable().GetValue(row, col)
        self._tc.SetValue(self._startValue)
        self._tc.SetFocus()

        # Select the text when initiating an edit so that subsequent typing
        # replaces the contents.
        self._tc.SetSelection(0, self._tc.GetLastPosition())

    def EndEdit(self, row, col, grid):
        """ Commit editing the current cell. Returns True if the value has changed.
            If necessary, the control may be destroyed. Must Override.
        """
        changed = False                             # Assume value not changed
        val = self._tc.GetValue()                   # Get value in edit control
        if val != self._startValue:                 # Compare
            changed = True                          # If different then changed is True
            grid.GetTable().SetValue(row, col, val) # Update the table
        self._startValue = ''                       # Clear the class' start value
        self._tc.SetValue('')                       # Clear contents of the edit control

        return changed

    def Reset(self):
        """ Reset the value in the control back to its starting value. Must Override. """
        self._tc.SetValue(self._startValue)
        self._tc.SetInsertionPointEnd()

    def IsAcceptedKey(self, evt):
        """ Return True to allow the given key to start editing.  The base class
            version only checks that the event has no modifiers.  F2 is special
            and will always start the editor.
        """
        return (not (evt.ControlDown() or evt.AltDown())
                and  evt.GetKeyCode() != wx.WXK_SHIFT)

    def StartingKey(self, evt):
        """ If the editor is enabled by pressing keys on the grid, this will be
            called to let the editor react to that first key.
        """
        key = evt.GetKeyCode()              # Get the key code
        ch = None                           # Handle num pad keys
        if key in [ wx.WXK_NUMPAD0, wx.WXK_NUMPAD1, wx.WXK_NUMPAD2, wx.WXK_NUMPAD3, 
                    wx.WXK_NUMPAD4, wx.WXK_NUMPAD5, wx.WXK_NUMPAD6, wx.WXK_NUMPAD7, 
                    wx.WXK_NUMPAD8, wx.WXK_NUMPAD9]:
            ch = chr(ord('0') + key - wx.WXK_NUMPAD0)

        elif key == wx.WXK_BACK:               # Empty text control when init w/ back key
            ch = ""
                                            # Handle normal keys
        elif key < 256 and key >= 0 and chr(key) in string.printable:
            ch = chr(key)
            if not evt.ShiftDown():
                ch = ch.lower()

        if ch is not None:                  # If are at this point with a key,
            self._tc.SetValue(ch)           # replace the contents of the text control.
            self._tc.SetInsertionPointEnd() # Move to the end so that subsequent keys are appended
        else:
            evt.Skip()

    def StartingClick(self):
        """ If the editor is enabled by clicking on the cell, this method will be
            called to allow the editor to simulate the click on the control.
        """
        pass

    def Destroy(self):
        """ Final cleanup
        
            NOTE: There is no need to everride this if you don't need
            to do something out of the ordinary.
        """
        super(CCellEditor, self).Destroy()

    def Clone(self):
        """ Create a new object which is the copy of this one. Must Override. """
        return CCellEditor()

#---------------------------------------------------------------------------
class CSheet(wx.grid.Grid):
    def __init__(self, parent):
        wx.grid.Grid.__init__(self, parent, -1)

        # Init variables
        self._lastCol = -1              # Init last cell column clicked
        self._lastRow = -1              # Init last cell row clicked
        self._selected = None           # Init range currently selected
                                        # Map string datatype to default renderer/editor

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
波多野结衣欧美| 国产精品一区二区三区网站| 国产精品初高中害羞小美女文| 欧美二区三区的天堂| 欧美日本精品一区二区三区| 欧美亚洲一区二区在线观看| 91久久香蕉国产日韩欧美9色| 97精品国产露脸对白| 在线看日本不卡| 777午夜精品免费视频| 精品久久国产老人久久综合| 久久久久久9999| 国产精品人成在线观看免费| 亚洲乱码国产乱码精品精小说| **网站欧美大片在线观看| 亚洲激情图片一区| 日韩电影免费一区| 国产精品正在播放| 91国产精品成人| 日韩一级完整毛片| 国产精品传媒在线| 午夜久久久影院| 国产麻豆视频一区二区| 在线观看免费亚洲| 欧美www视频| 亚洲婷婷在线视频| 免费在线观看不卡| 成人一级片在线观看| 欧美日韩卡一卡二| 久久久99久久精品欧美| 亚洲免费资源在线播放| 看电视剧不卡顿的网站| av一本久道久久综合久久鬼色| 欧美精品在线视频| 国产精品区一区二区三| 亚洲高清免费一级二级三级| 国产高清亚洲一区| 欧美一区午夜精品| 亚洲乱码中文字幕综合| 国产伦精一区二区三区| 欧美午夜一区二区三区| 国产精品美女久久久久久| 五月激情综合色| 91免费在线视频观看| 久久综合色天天久久综合图片| 亚洲精品欧美综合四区| 国产精品亚洲а∨天堂免在线| 欧美日韩免费一区二区三区| 欧美高清在线一区| 韩国精品久久久| 欧美一级片在线看| 亚洲电影一级黄| 成人av高清在线| 久久五月婷婷丁香社区| 日韩精品电影在线| 欧美色窝79yyyycom| 中文字幕亚洲综合久久菠萝蜜| 美女视频黄久久| 欧美一区国产二区| 五月天激情综合| 91免费看`日韩一区二区| 国产日本亚洲高清| 国产精品996| 26uuuu精品一区二区| 青青草国产精品97视觉盛宴| 国产精品乱码久久久久久| 美美哒免费高清在线观看视频一区二区| 91一区一区三区| 综合久久久久久| 91亚洲大成网污www| 国产精品久久网站| 99久久免费国产| 亚洲免费观看视频| 91麻豆成人久久精品二区三区| 日韩一区日韩二区| 在线免费不卡电影| 日日欢夜夜爽一区| 91精品国产综合久久久蜜臀图片 | 另类小说一区二区三区| 欧美人狂配大交3d怪物一区| 一区二区三区加勒比av| 在线亚洲人成电影网站色www| 亚洲美腿欧美偷拍| 欧美日韩不卡在线| 蜜桃久久久久久久| 久久九九影视网| 不卡一区在线观看| 亚洲一区二区在线免费看| 在线观看三级视频欧美| 日韩av中文字幕一区二区| 精品国产乱码久久久久久1区2区| 老汉av免费一区二区三区| 欧美白人最猛性xxxxx69交| 国产美女久久久久| 亚洲人快播电影网| 欧美猛男超大videosgay| 日韩精品亚洲一区| 欧美极品少妇xxxxⅹ高跟鞋| 白白色 亚洲乱淫| 一区二区成人在线观看| 欧美一级高清片在线观看| 国产精品一区二区免费不卡 | www国产成人| voyeur盗摄精品| 亚洲在线成人精品| 2022国产精品视频| 色综合天天综合网天天看片| 日韩经典中文字幕一区| 久久―日本道色综合久久| 99精品一区二区三区| 婷婷成人激情在线网| 久久久久久久免费视频了| 日本韩国精品一区二区在线观看| 蓝色福利精品导航| 亚洲国产一区二区在线播放| 精品国产免费一区二区三区四区| 高清成人在线观看| 日本中文字幕一区二区视频| 国产精品欧美精品| 欧美一卡在线观看| 色婷婷狠狠综合| 丰满少妇在线播放bd日韩电影| 五月天亚洲婷婷| 亚洲日本丝袜连裤袜办公室| 日韩精品一区二区三区蜜臀| 日本乱人伦一区| 成人福利视频在线| 久久99日本精品| 爽好多水快深点欧美视频| 亚洲精品福利视频网站| 国产欧美视频在线观看| 这里是久久伊人| 欧美视频一区二区三区| 99国产精品久| 成人av影院在线| 成人影视亚洲图片在线| 精品一区二区三区蜜桃| 日日夜夜免费精品视频| 亚洲激情校园春色| 亚洲人成网站在线| 中文字幕免费不卡在线| 久久久.com| 国产亚洲视频系列| 欧美变态凌虐bdsm| 欧美成人a在线| 欧美一区二区福利视频| 日韩一区二区免费视频| 制服丝袜亚洲色图| 欧美一区二区三区日韩| 91麻豆精品久久久久蜜臀| 欧美日韩中文国产| 欧美一区二区视频在线观看| 欧美视频一区二| 777午夜精品视频在线播放| 精品视频123区在线观看| 欧美日韩在线免费视频| 欧美精品1区2区3区| 欧美军同video69gay| 欧美人妖巨大在线| 欧美xxxxxxxxx| 国产精品三级视频| 亚洲男同性恋视频| 午夜不卡在线视频| 免费高清在线一区| 国产成人精品一区二| 99精品久久99久久久久| 日本精品一区二区三区高清| 欧美午夜宅男影院| 精品久久久久久久人人人人传媒 | 99精品国产91久久久久久| 色婷婷av一区二区三区软件| 欧美主播一区二区三区美女| 欧美一级片在线观看| 欧美激情一区二区在线| 亚洲婷婷综合色高清在线| 亚洲h在线观看| 国产精品自拍一区| 91黄色免费观看| 国产成人精品免费| 欧美日韩国产精品自在自线| 激情都市一区二区| 亚洲成人精品影院| 久久99精品视频| 岛国精品在线观看| 91久久精品一区二区二区| 亚洲精品欧美综合四区| 欧美一级日韩免费不卡| 日本精品一区二区三区高清| 欧美一区二区三区视频在线| 色噜噜狠狠成人网p站| 国产精品青草综合久久久久99| 亚洲欧美自拍偷拍| 日本aⅴ亚洲精品中文乱码| 国内成人免费视频| 日本韩国欧美一区二区三区| 日韩你懂的电影在线观看| 亚洲天堂免费看| 日本亚洲免费观看| 懂色av噜噜一区二区三区av| 色欧美日韩亚洲|