# 需要导入模块: import Pmw [as 别名]

# 或者: from Pmw import NoteBook [as 别名]

def __init__(self, parent, section):

self.section=section

self.settings = self.read_settings()

self.changes_flag = False

self.dialog = Pmw.Dialog(parent,

buttons = ('OK', 'Apply', 'Cancel'),

defaultbutton = 'OK',

title = section + ' Settings',

command = self.execute)

self.dialog.bind('', self.cancel)

self.balloon = Pmw.Balloon(self.dialog.interior(),

label_wraplength=400)

notebook = Pmw.NoteBook(self.dialog.interior())

notebook.pack(fill = 'both', expand = 1, padx = 10, pady = 10)

self.entrydict = {section: {}}

if section == 'General':

subsections = ['General',]

subsettings = self.settings

else:

subsettings = self.settings[section]

subsections = subsettings.sections

for subsection in subsections:

page = notebook.add(subsection)

subsubsettings = subsettings[subsection]

self.entrydict[section].update({subsection:{}})

for itemname, itemvalue in subsubsettings.items():

if not itemname.startswith('_'):

if not itemname.endswith('Tooltip'):

entry = Pmw.EntryField(page,

labelpos = 'w',

label_text = '%s:' % itemname,

validate = None,

command = None)

if itemname.find("Password") == -1:

entry.setvalue(itemvalue)

else:

entry.setvalue(myutils.password_recover(itemvalue))

entry.pack(fill='x', expand=1, padx=10, pady=5)

self.balloon.bind(entry,

subsubsettings[itemname + ' Tooltip'].replace('\\n','\n'))

self.entrydict[section][subsection].update({itemname: entry})

if len(self.entrydict.keys()) == 1 and \

self.entrydict.keys()[0] == 'General':

self.entrydict = self.entrydict['General']

notebook.setnaturalsize()

python中notebook左侧in中_Python Pmw.NoteBook方法代码示例相关推荐

  1. python中uppercase是什么意思_Python string.ascii_uppercase方法代码示例

    本文整理汇总了Python中string.ascii_uppercase方法的典型用法代码示例.如果您正苦于以下问题:Python string.ascii_uppercase方法的具体用法?Pyth ...

  2. python中right是什么意思_Python turtle.right方法代码示例

    本文整理汇总了Python中turtle.right方法的典型用法代码示例.如果您正苦于以下问题:Python turtle.right方法的具体用法?Python turtle.right怎么用?P ...

  3. python中uniform(a、b)_Python stats.uniform方法代码示例

    本文整理汇总了Python中scipy.stats.uniform方法的典型用法代码示例.如果您正苦于以下问题:Python stats.uniform方法的具体用法?Python stats.uni ...

  4. python中uppercase是什么意思_Python string.uppercase方法代码示例

    本文整理汇总了Python中string.uppercase方法的典型用法代码示例.如果您正苦于以下问题:Python string.uppercase方法的具体用法?Python string.up ...

  5. python类怎么实例化rnn层_Python backend.rnn方法代码示例

    本文整理汇总了Python中keras.backend.rnn方法的典型用法代码示例.如果您正苦于以下问题:Python backend.rnn方法的具体用法?Python backend.rnn怎么 ...

  6. python中stringvar的用法_Python tkinter.StringVar方法代码示例

    本文整理汇总了Python中tkinter.StringVar方法的典型用法代码示例.如果您正苦于以下问题:Python tkinter.StringVar方法的具体用法?Python tkinter ...

  7. python中formatter的用法_Python pyplot.FuncFormatter方法代码示例

    本文整理汇总了Python中matplotlib.pyplot.FuncFormatter方法的典型用法代码示例.如果您正苦于以下问题:Python pyplot.FuncFormatter方法的具体 ...

  8. python中geometry用法_Python geometry.Point方法代码示例

    本文整理汇总了Python中shapely.geometry.Point方法的典型用法代码示例.如果您正苦于以下问题:Python geometry.Point方法的具体用法?Python geome ...

  9. python中bind的用法_Python socket.bind方法代码示例

    本文整理汇总了Python中socket.bind方法的典型用法代码示例.如果您正苦于以下问题:Python socket.bind方法的具体用法?Python socket.bind怎么用?Pyth ...

  10. python中font的用法_Python font.nametofont方法代码示例

    本文整理汇总了Python中tkinter.font.nametofont方法的典型用法代码示例.如果您正苦于以下问题:Python font.nametofont方法的具体用法?Python fon ...

最新文章

  1. 解释为什么用梯度下降而不是直接求导数为0的解
  2. Python 文件与目录操作方法总结
  3. 常微分方程数值解:欧拉公式
  4. SBO中流程控制功能的实现-SBO_SP_TransactionNotification
  5. Hive中COUNT的高级用法(条件过滤等)
  6. vue 高德地图 不同区域显示不同颜色_高德百度哪家强?苹果Carplay第三方分屏功能评测...
  7. r语言 柱状图加星号_R语言绘制带有显著性字母标记的柱状图
  8. 基于百度贴吧的HIV高危人群特征分析
  9. 数字校园项目-学生失联预警系统(二)-----项目部署
  10. Delphi XE5 for Android (三)
  11. Photoshop - CMYK 和 RGB 区别是什么?
  12. Recall(召回率), Specificity(特异度),Precision(精确度), Sensitivity(灵敏度)
  13. S5PV210裸机之串口
  14. php+5.3.7++,Windows Server 2008(R2) 一键安装PHP环境(PHP5.3+FastCGI模式
  15. Thunk,thunk,thunk
  16. 高德地图车机版增加地标性品牌图标 让你“约会”无压力
  17. crh寄存器_STM32 学习笔记(寄存器)---2
  18. Redis是什么?Redis有哪些数据类型?Redis怎么集群?
  19. Dmc雷赛板卡仿写(三):创建类
  20. Oasis Engine 3d全景展示demo

热门文章

  1. 输出4+44+444+4444
  2. 跑步听歌用什么耳机好?适合跑步专用的耳机推荐
  3. php excel扩展名,excel后缀名是什么
  4. Linux 用ssh远程登录及scp传输文件
  5. ant design vue日期组件怎么清空(a-range-picker,a-date-picker)
  6. 计算机科学(Computer Science)到底学什么?
  7. glTF-Transform处理gltf模型
  8. 雨水情测报系统+智慧水库大坝安全监测系统
  9. java计算机毕业设计计算机课程在线培训学习管理系统MyBatis+系统+LW文档+源码+调试部署
  10. IT项目经理沟通技巧的重要性