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

# 或者: from win32gui import MoveWindow [as 别名]

def _CreateChildWindow(self, prev):

# Creates the list view window.

assert self.hwnd_child is None, "already have a window"

assert self.cur_foldersettings is not None, "no settings"

style = win32con.WS_CHILD | win32con.WS_VISIBLE | win32con.WS_BORDER | \

commctrl.LVS_SHAREIMAGELISTS | commctrl.LVS_EDITLABELS

view_mode, view_flags = self.cur_foldersettings

if view_mode==shellcon.FVM_ICON:

style |= commctrl.LVS_ICON | commctrl.LVS_AUTOARRANGE

elif view_mode==shellcon.FVM_SMALLICON:

style |= commctrl.LVS_SMALLICON | commctrl.LVS_AUTOARRANGE

elif view_mode==shellcon.FVM_LIST:

style |= commctrl.LVS_LIST | commctrl.LVS_AUTOARRANGE

elif view_mode==shellcon.FVM_DETAILS:

style |= commctrl.LVS_REPORT | commctrl.LVS_AUTOARRANGE

else:

# XP 'thumbnails' etc

view_mode = shellcon.FVM_DETAILS

# Default to 'report'

style |= commctrl.LVS_REPORT | commctrl.LVS_AUTOARRANGE

for f_flag, l_flag in [

(shellcon.FWF_SINGLESEL, commctrl.LVS_SINGLESEL),

(shellcon.FWF_ALIGNLEFT, commctrl.LVS_ALIGNLEFT),

(shellcon.FWF_SHOWSELALWAYS, commctrl.LVS_SHOWSELALWAYS),

]:

if view_flags & f_flag:

style |= l_flag

self.hwnd_child = win32gui.CreateWindowEx(

win32con.WS_EX_CLIENTEDGE,

"SysListView32", None, style,

0, 0, 0, 0,

self.hwnd, 1000, 0, None)

cr = win32gui.GetClientRect(self.hwnd)

win32gui.MoveWindow(self.hwnd_child,

0, 0, cr[2]-cr[0], cr[3]-cr[1],

True)

# Setup the columns for the view.

lvc, extras = win32gui_struct.PackLVCOLUMN(fmt=commctrl.LVCFMT_LEFT,

subItem=1,

text='Name',

cx=300)

win32gui.SendMessage(self.hwnd_child, commctrl.LVM_INSERTCOLUMN,

0, lvc)

lvc, extras = win32gui_struct.PackLVCOLUMN(fmt=commctrl.LVCFMT_RIGHT,

subItem=1,

text='Exists',

cx=50)

win32gui.SendMessage(self.hwnd_child, commctrl.LVM_INSERTCOLUMN,

1, lvc)

# and fill it with the content

self.Refresh()

pythonwin32api拖动图标_Python win32gui.MoveWindow方法代码示例相关推荐

  1. doc python 颜色_Python wordcloud.ImageColorGenerator方法代码示例

    本文整理汇总了Python中wordcloud.ImageColorGenerator方法的典型用法代码示例.如果您正苦于以下问题:Python wordcloud.ImageColorGenerat ...

  2. python连接redis哨兵_Python redis.sentinel方法代码示例

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

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

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

  4. python max((1、2、3)*2)_Python functional.max_pool2d方法代码示例

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

  5. python html模板_Python html.format_html方法代码示例

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

  6. python session模块_Python backend.set_session方法代码示例

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

  7. python程序异常实例_Python werkzeug.exceptions方法代码示例

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

  8. python color属性_Python turtle.color方法代码示例

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

  9. python end用法_Python turtle.end_fill方法代码示例

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

最新文章

  1. Jenkins进阶系列之——01使用email-ext替换Jenkins的默认邮件通知
  2. 记一次mpvue开发完整小程序相关笔记
  3. linux shell 错误 [: =: unary operator expected 解决办法
  4. asp导出EXCEL数字格式及自动适应宽度的问题
  5. 前端(一)——HTML之基本标签、图片标签、超链接、锚链接
  6. Spring Security认证过程
  7. 世界上最危险的20座七绝古寺,你敢去住一晚吗?
  8. C#制作、打包、签名、发布Activex全过程
  9. 有问有答 | AWS使用精华问答,带您开启 AWS 上的云计算之旅!
  10. MySQL 到底能不能放到 Docker 里跑?
  11. 局域网远程访问时显示密码过期
  12. 修复Lvgl的roller控件点击位置向上偏移的问题
  13. marlab中主成分得分怎么求_雅漾恒润保湿精华乳,做完配方成分解读,我表示遗憾,决定守住我的花呗...
  14. 公制与英制长度转换 c语言,公制和英制的换算在线(在线公制转英制转换器)
  15. 学习java兴趣之作模仿原神抽卡模块。希望哥、姐指点一下以下是代码;
  16. 7. 重磅硬核 | 一文聊透对象在JVM中的内存布局,以及内存对齐和压缩指针的原理及应用
  17. 记一次 .NET 某桌面奇侠游戏 非托管内存泄漏分析
  18. Python---python3.7.0---如何安装PIL
  19. IK-analyzer添加搜狗词库
  20. P1240 诸侯安置 [dp]

热门文章

  1. W5500EVB实现NetBIOS协议
  2. 计算机开机没反应怎么办,细说电脑开机没反应怎么办
  3. 龙族幻想冰龙古洞计算机指令,龙族幻想挑战代码指令及电脑位置详解 龙族幻想代号末日卡木头人bug...
  4. yolov5 Detected call of `lr_scheduler.step()` before `optimizer.step()`.
  5. 大厂嫡系文化,养肥了谁?
  6. [Java]Java编译环境的下载安装教程(Windows)
  7. SPI总线传输的模式
  8. WebMagic 剖析
  9. Low Power Design in SoC Using Arm IP
  10. 解决ARDUINO NRF2401+ LAN PA无法使用问题