Python论坛  - 讨论区

标题:[python-chinese] wxPython中如何获得当前窗体在屏幕中的坐标?

2006年02月09日 星期四 14:26

HoLin holin.he at gmail.com
Thu Feb 9 14:26:03 HKT 2006

查了很多东西,有个ScreenToClient的,是这个吗?在wxPython中怎么用 啊?

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年02月09日 星期四 15:21

黑沙 fred.li.1979.m.bj.prc at gmail.com
Thu Feb 9 15:21:19 HKT 2006

wxWindow::GetPosition

*virtual void* *GetPosition*(*int* **x*, *int* **y*) *const*

*wxPoint* *GetPosition*() *const*

This gets the position of the window in pixels, relative to the parent
window for the child windows or relative to the display origin for the top
level windows.

*Parameters*

*x*

   Receives the x position of the window.

*y*

   Receives the y position of the window.

*wxPython note:* In place of a single overloaded method name, wxPython
implements the following methods:


     *GetPosition()* Returns a wxPoint  *GetPositionTuple()* Returns a
      tuple (x, y)

*wxPerl note:* In wxPerl there are two methods instead of a single
overloaded method:


     *GetPosition()* Returns a Wx::Point  *GetPositionXY()* Returns a
      2-element list ( x, y )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060209/65e881c2/attachment.htm

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年02月09日 星期四 16:35

HoLin holin.he at gmail.com
Thu Feb 9 16:35:44 HKT 2006

谢谢!~
如果可以再麻烦告诉一下获取屏幕分辨率的方法。:P
文档不熟悉,查不来啊。:(
试着查screen,可没找到。


On 2/9/06, 黑沙 <fred.li.1979.m.bj.prc at gmail.com> wrote:
>
> wxWindow::GetPosition
>
> *virtual void* *GetPosition*(*int* **x*, *int* **y*) *const*
>
> *wxPoint* *GetPosition*() *const*
>
> This gets the position of the window in pixels, relative to the parent
> window for the child windows or relative to the display origin for the top
> level windows.
>
> *Parameters*
>
> *x*
>
>    Receives the x position of the window.
>
> *y*
>
>    Receives the y position of the window.
>
> *wxPython note:* In place of a single overloaded method name, wxPython
> implements the following methods:
>
>
>      *GetPosition()* Returns a wxPoint  *GetPositionTuple()* Returns a
>       tuple (x, y)
>
> *wxPerl note:* In wxPerl there are two methods instead of a single
> overloaded method:
>
>
>      *GetPosition()* Returns a Wx::Point  *GetPositionXY()* Returns a
>       2-element list ( x, y )
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060209/f762ddd3/attachment.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年02月09日 星期四 17:02

HoLin holin.he at gmail.com
Thu Feb 9 17:02:39 HKT 2006

wxSystemSettings.GetMetric(wxSYS_SCREEN_X) 找到了:)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060209/a9dfb861/attachment.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号