有没有办法在 Perl 5.004/Tk 400 中使用 gridRowconfigure

发布于 2024-07-23 20:50:22 字数 267 浏览 3 评论 0原文

在你问“你为什么使用那个旧版本的 Perl?”之前,这不是我能控制的。 我必须使用我可以使用的工具来完成这个项目。 我的问题是,有谁知道这是否可能,如果可能的话,使用 gridRowconfigure 的语法如下:

$main_window->gridRowconfigure(1, -weight => 1, -minsize => 171, -pad => 0);

in,Perl 5.004,Tk 400。谢谢。

Before you ask, "Why are you using that old version of Perl?", it is out of my hands. I have to use the tools available to me for this project. My question is does anyone know if it is possible, and if so what the syntax looks like to use gridRowconfigure as follows:

$main_window->gridRowconfigure(1, -weight => 1, -minsize => 171, -pad => 0);

in, Perl 5.004, Tk 400. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

携余温的黄昏 2024-07-30 20:50:22

由于您使用的是 Tk-400.202,因此“perldoc Tk::grid”应该告诉您需要了解的内容。 您可能需要阅读一些其他文档,但是:

$master->gridRowconfigure(index?, -option=>value, ...?) 
  

查询或设置几何图形索引行的行属性
大师,$大师。 有效选项是 -minsize、-weight 和 -pad。
如果提供了一个或多个选项,则索引可以作为
配置选项将对其进行操作的行索引[原文如此]的列表
在。 -minsize 选项设置最小尺寸(以屏幕单位为单位),
该行将允许这样做。 -weight 选项(
整数值)设置分配任何额外的相对权重
行之间的空格。 权重为零 (0) 表示该行不会
偏离其要求的尺寸。 权重为 2 的行将
当有额外空间时,其增长速度是一行重量的两倍
分配给布局。 -uniform 选项,当非空时
提供值,将该行与其他行放在一个统一的组中
具有相同 -uniform 值的行。 行的空间
属于一个统一的组被分配,以便它们的大小是
始终与其权重值严格成比例。 查看网格
请参阅下面的算法了解更多详细信息。 -pad 选项指定
将添加到最大窗口的屏幕单元数
当网格几何管理器完全包含在该行中时
从包含窗口请求尺寸。 如果只有一个选项
指定,没有值,该选项的当前值为
回。 如果仅指定主窗口和索引,则所有
当前设置在“选项值”列表中返回
对。

正如我在对该问题的评论中指出的那样 - 这是应该升级的古董软件。

Since you are using Tk-400.202, it appears that 'perldoc Tk::grid' should tell you what you need to know. You will probably need to read some other documentation, but:

$master->gridRowconfigure(index?, -option=>value, ...?)

Query or set the row properties of the index row of the geometry
master, $master. The valid options are -minsize, -weight and -pad.
If one or more options are provided, then index may be given as a
list of row indeces [sic] to which the configuration options will operate
on. The -minsize option sets the minimum size, in screen units,
that will be permitted for this row. The -weight option (an
integer value) sets the relative weight for apportioning any extra
spaces among rows. A weight of zero (0) indicates the row will not
deviate from its requested size. A row whose weight is two will
grow at twice the rate as a row of weight one when extra space is
allocated to the layout. The -uniform option, when a non-empty
value is supplied, places the row in a uniform group with other
rows that have the same value for -uniform. The space for rows
belonging to a uniform group is allocated so that their sizes are
always in strict proportion to their -weight values. See THE GRID
ALGORITHM below for further details. The -pad option specifies the
number of screen units that will be added to the largest window
contained completely in that row when the grid geometry manager
requests a size from the containing window. If only an option is
specified, with no value, the current value of that option is
returned. If only the master window and index is specified, all
the current settings are returned in an list of "option-value"
pairs.

As I noted in a comment to the question - this is antique software that should be upgraded.

方圜几里 2024-07-30 20:50:22

如果这意味着 Tk 4.0,我想你不能。 网格是在 Tk 4.1 中添加的。

如果 Grid 存在,则 rowconfigure 应该存在,因为它从一开始就存在。 当您尝试上面写的内容时,您遇到什么问题/错误?

If that means Tk 4.0, I guess you can't. Grid was added in Tk 4.1.

If Grid is present, rowconfigure should be since it was there from the start. What problem/error do you get when you try what you wrote above?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文