gpt4 book ai didi

css - 如何在 Ruby 中对齐 Shoes GUI Toolkit 中的按钮

转载 作者:行者123 更新时间:2023-11-28 02:27:14 26 4
gpt4 key购买 nike

我正在使用 Ruby 中的 Shoes 工具包创建一个 GUI 应用程序,并使用 require 'green_shoes' gem。

元素正在进行中,但我在将按钮居中对齐时遇到了问题有人知道怎么做吗?我有一个示例代码:

Shoes.app width:500, height: 400 do
stack do
para "input here"
button button1
@content = edit_line
end
end

最佳答案

您可以使用:左、右、上和下。我不确定是否居中,但您可以以像素为单位给出 x、y 坐标。

stack(left: 35, top: 90) do
para "input here"
button button1
@content = edit_line
end

这也是一个很好的演练:http://shoesrb.com/walkthrough/

关于css - 如何在 Ruby 中对齐 Shoes GUI Toolkit 中的按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47892359/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com