pythonwin32api拖动图标_Python win32gui.MoveWindow方法代码示例
# 需要导入模块: 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方法代码示例相关推荐
- doc python 颜色_Python wordcloud.ImageColorGenerator方法代码示例
本文整理汇总了Python中wordcloud.ImageColorGenerator方法的典型用法代码示例.如果您正苦于以下问题:Python wordcloud.ImageColorGenerat ...
- python连接redis哨兵_Python redis.sentinel方法代码示例
本文整理汇总了Python中redis.sentinel方法的典型用法代码示例.如果您正苦于以下问题:Python redis.sentinel方法的具体用法?Python redis.sentine ...
- python类怎么实例化rnn层_Python backend.rnn方法代码示例
本文整理汇总了Python中keras.backend.rnn方法的典型用法代码示例.如果您正苦于以下问题:Python backend.rnn方法的具体用法?Python backend.rnn怎么 ...
- python max((1、2、3)*2)_Python functional.max_pool2d方法代码示例
本文整理汇总了Python中torch.nn.functional.max_pool2d方法的典型用法代码示例.如果您正苦于以下问题:Python functional.max_pool2d方法的具体 ...
- python html模板_Python html.format_html方法代码示例
本文整理汇总了Python中django.utils.html.format_html方法的典型用法代码示例.如果您正苦于以下问题:Python html.format_html方法的具体用法?Pyt ...
- python session模块_Python backend.set_session方法代码示例
本文整理汇总了Python中keras.backend.set_session方法的典型用法代码示例.如果您正苦于以下问题:Python backend.set_session方法的具体用法?Pyth ...
- python程序异常实例_Python werkzeug.exceptions方法代码示例
本文整理汇总了Python中werkzeug.exceptions方法的典型用法代码示例.如果您正苦于以下问题:Python werkzeug.exceptions方法的具体用法?Python wer ...
- python color属性_Python turtle.color方法代码示例
本文整理汇总了Python中turtle.color方法的典型用法代码示例.如果您正苦于以下问题:Python turtle.color方法的具体用法?Python turtle.color怎么用?P ...
- python end用法_Python turtle.end_fill方法代码示例
本文整理汇总了Python中turtle.end_fill方法的典型用法代码示例.如果您正苦于以下问题:Python turtle.end_fill方法的具体用法?Python turtle.end_ ...
最新文章
- Jenkins进阶系列之——01使用email-ext替换Jenkins的默认邮件通知
- 记一次mpvue开发完整小程序相关笔记
- linux shell 错误 [: =: unary operator expected 解决办法
- asp导出EXCEL数字格式及自动适应宽度的问题
- 前端(一)——HTML之基本标签、图片标签、超链接、锚链接
- Spring Security认证过程
- 世界上最危险的20座七绝古寺,你敢去住一晚吗?
- C#制作、打包、签名、发布Activex全过程
- 有问有答 | AWS使用精华问答,带您开启 AWS 上的云计算之旅!
- MySQL 到底能不能放到 Docker 里跑?
- 局域网远程访问时显示密码过期
- 修复Lvgl的roller控件点击位置向上偏移的问题
- marlab中主成分得分怎么求_雅漾恒润保湿精华乳,做完配方成分解读,我表示遗憾,决定守住我的花呗...
- 公制与英制长度转换 c语言,公制和英制的换算在线(在线公制转英制转换器)
- 学习java兴趣之作模仿原神抽卡模块。希望哥、姐指点一下以下是代码;
- 7. 重磅硬核 | 一文聊透对象在JVM中的内存布局,以及内存对齐和压缩指针的原理及应用
- 记一次 .NET 某桌面奇侠游戏 非托管内存泄漏分析
- Python---python3.7.0---如何安装PIL
- IK-analyzer添加搜狗词库
- P1240 诸侯安置 [dp]
热门文章
- W5500EVB实现NetBIOS协议
- 计算机开机没反应怎么办,细说电脑开机没反应怎么办
- 龙族幻想冰龙古洞计算机指令,龙族幻想挑战代码指令及电脑位置详解 龙族幻想代号末日卡木头人bug...
- yolov5 Detected call of `lr_scheduler.step()` before `optimizer.step()`.
- 大厂嫡系文化,养肥了谁?
- [Java]Java编译环境的下载安装教程(Windows)
- SPI总线传输的模式
- WebMagic 剖析
- Low Power Design in SoC Using Arm IP
- 解决ARDUINO NRF2401+ LAN PA无法使用问题