f.pos 未定义?

发布于 2024-08-12 08:56:19 字数 397 浏览 3 评论 0原文

我的问题的简化版本

    require 'wx'
Wx::App.run do
  f = Wx::Frame.new nil
  f.title= 'the potlee'
  f.size= Wx::Size.new( 200 , 500)
  f.pos= Wx::point.new(50,50)
  f.show
end

我收到此错误

`method_missing': undefined method `pos=' for #<Wx::Frame:0x207d020>

如何设置框架上的尺寸而不是位置?

注意:在 Windows 上使用最新版本的 wxruby(带有自己的 ruby​​ 解释器)。

simplified version of my problem

    require 'wx'
Wx::App.run do
  f = Wx::Frame.new nil
  f.title= 'the potlee'
  f.size= Wx::Size.new( 200 , 500)
  f.pos= Wx::point.new(50,50)
  f.show
end

i get this error

`method_missing': undefined method `pos=' for #<Wx::Frame:0x207d020>

how can i set the size on the frame but not the position?

note:using the latest version of wxruby on windows(which came with its own ruby interpreter).

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

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

发布评论

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

评论(1

在你怀里撒娇 2024-08-19 08:56:19

Wx::Point 不应该是大写的 P 吗?

Should you not have a capital P for Wx::Point?

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