简单的方法,使打开文件对话框的尺寸更小? [英] Simple way to make OpenFileDialog smaller in size?

查看:170
本文介绍了简单的方法,使打开文件对话框的尺寸更小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为它有一个480×800竖屏手持设备x86的.NET应用程序。一切正常的精彩除非涉及到一个打开文件/保存文件的设计。时显示,使得打开按钮partialy出画面和取消按钮的总出它的默认打开文件对话框和其他类似的对话过大的宽度。其实用户可以调整对话框它显示后,却存在一个最小尺寸 width仍比480大。

I'm working on a .NET application for a handheld x86 device which has a 480*800 vertical screen. Everything works wonderful except when comes to a Open File / Save File design. The default OpenFileDialog and other similar dialogs are too big in width when shown, making Open button partialy out of screen and Cancel button total out of it. Actually user can resize the dialog after it's shown, but there exists a MINIMUM SIZE with width still bigger than 480.

据我可以看到有没有办法操纵打开文件对话框直接,也没有做任何的继承。该的FileDialog 其中打开文件对话框继承是不可继承。而的CommonDialog 看起来太遥远了。谷歌搜索显示里面有很多功能我不希望一些商业对话框组件,一个黑客攻击的解决方案最终与至少4个全新的类和部分的Win32 API和消息机制一个项目,我不需要任何。

As far as I can see there's no way to manipulate OpenFileDialog directly, nor to do any inheritance. The FileDialog which OpenFileDialog inherits from is not inheritable. And CommonDialog looks too far away. Googling shows some commercial dialog components which has lot of functions I don't want, a hacking solution ends up with a project with at least 4 brand new classes and some Win32 APIs and messaging mechanics i don't need either.

这很简单,我只是想解决的OpenFileDialog的宽度为480或更小的简单方法。解决这个办法?

It's very simple, I just want a simple way to fix the width of OpenFileDialog to 480 or smaller. Any way around this?

推荐答案

打开文件对话框是一个系统对话框。这意味着你的应用程序有没有对其进行控制。它是由用户控制。如果用户想要改变其大小在一个应用中,这将获得新的大小在所有的应用中,由于这是大小用户的preference

Open file dialog is a system dialog. It means that your application has no control over it. It is controlled by user. If user wants to change its size in one application, it will gain new size in all applications, since this size is user's preference.

通用对话框的目的是提供标准的UI部分用户。想象一下,那将是多么不舒服,用户可以搜索文件打开,如果每个应用程序将使用它自己的OpenFileDialog。

Purpose of common dialogs is providing standard UI parts to user. Imagine how uncomfortable for users it would be to search for file to open if every application would use its own OpenFileDialog.

不过,你可以建立自己的对话框。

However you can build your own dialog.

这篇关于简单的方法,使打开文件对话框的尺寸更小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆