Getting User Display Information

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Skulled2003@netscape.net

    Getting User Display Information

    Hi there,

    I was wondering if it was possible to get the screen display size and other associated properties somehow either using python modules or if possible using Tk methods.

    Thanks a lot.

    Vinod

    _______________ _______________ _______________ _______________ ______
    Switch to the New Netscape Internet Service.
    As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

    Netscape. Just the Net You Need.

    New! Netscape Toolbar for Internet Explorer
    Search from anywhere on the Web and block those annoying pop-ups.
    Download now at http://channels.netscape.com/ns/search/install.jsp

  • Christopher T King

    #2
    Re: Getting User Display Information

    > I was wondering if it was possible to get the screen display size and[color=blue]
    > other associated properties somehow either using python modules or if
    > possible using Tk methods.[/color]

    Using Tkinter:

    from Tkinter import Tk
    w=Tk()
    print w.winfo_screenw idth(),w.winfo_ screenheight()
    w.destroy()

    There's a plethora of other information available as methods of the Tk
    object (actually any Tkinter widget), including color depth, cursor
    position, window manager type, etc.

    Note that this is actually creating a Tk window; calling its destroy()
    method right after you've finished with it prevents it from appearing on
    screen. Don't do this if you actually are creating a GUI with Tk.

    Comment

    • Mark Hertel

      #3
      Re: Getting User Display Information

      On Wed, 30 Jun 2004 12:10:45 -0400, Christopher T King <squirrel@WPI.E DU> wrote:[color=blue][color=green]
      >> I was wondering if it was possible to get the screen display size and
      >> other associated properties somehow either using python modules or if
      >> possible using Tk methods.[/color]
      >
      > Using Tkinter:
      >
      > from Tkinter import Tk
      > w=Tk()
      > print w.winfo_screenw idth(),w.winfo_ screenheight()
      > w.destroy()
      >
      > There's a plethora of other information available as methods of the Tk
      > object (actually any Tkinter widget), including color depth, cursor
      > position, window manager type, etc.
      >
      > Note that this is actually creating a Tk window; calling its destroy()
      > method right after you've finished with it prevents it from appearing on
      > screen. Don't do this if you actually are creating a GUI with Tk.[/color]

      Is there anyway to get the size of the available screen. I have things
      like the status bar across the bottom of the screen (redhat) and I would
      like to size my application so that it doesn't overlap it.


      --Mark

      Comment

      Working...