动态调整小工具设置窗口的大小? [英] Dynamically Resize Gadget Settings Window?

查看:202
本文介绍了动态调整小工具设置窗口的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个小工具,最多可以在文本字段中输入10个文本.规范是用户将使用三个左右.我的Settings.html文件的默认视图显示三个文本框.我想要一个按钮,将另一行添加到数据输入表中,然后单击该按钮时,以动态调整(增大")设置"面板的高度,然后显示新行. /p>

可以动态调整设置"面板的大小吗?我已经尝试了DHTML的一些技巧,但是它们似乎不起作用.

预先感谢...

解决方案

设置对话框的大小是固定的.您的HTML可以具有任何喜欢的大小,只要您愿意让它滚动即可(默认情况下不会滚动,但是您应该能够使用CSS溢出样式进行更改).

对于您而言,最好重新考虑您的方法.为什么不提供一堆多行文本框,用户在其中用换行符分隔其条目,而不是展示一堆单行文本框?或通过在单行文本框中输入数据并按添加"来填充的列表框.按钮(通过在列表框中选择条目并单击删除"按钮来删除条目)?通过这两种方法,您还可以获得不将用户限制为10个项目的任意限制的好处.


I have a gadget which allows up to 10 text entries into text fields.  The norm will be that a user will utilize three or so.  My default view of my Settings.html file shows three textboxes.  I would like to have a button to add another row to the data entry table, and, when that button is clicked, to dynamically resize ("grow") the height of the Settings panel, and to then display the new row.

Is it posible to resize the Settings panel dynamically?  I've tried a few techniques with DHTML, but they don't seem to work.

Thanks in advance...

解决方案

The settings dialog is fixed in size.  Your HTML can have whatever size it likes, as long as you're willing to allow it to scroll (doesn't scroll by default, but you should be able to change that with the CSS overflow style).

 

In your case, it might be better to re-think your approach.  Rather than presenting a bunch of single-line textboxes, why not provide a single multi-line textbox where the user delimits his entries with newlines?  Or a listbox that is populated by entering data into a single-line textbox and pressing an "Add" button (remove entries by selecting them in the listbox and clicking a "Remove" button)?  With either of these approaches, you also get the benefit of not restricting the user to an arbitrary limit of 10 items.


这篇关于动态调整小工具设置窗口的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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