×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    14

    Problem with TopWindow

    Hi.

    I wanted to make a simple app, using TopWindow, which would display a message to the user on top of other windows. I tried this code, but it's not working:

    Code:
    import TopWindow, graphics, e32
    height = 40
    width = 240
    top = 280
    left = 0
    window = TopWindow.TopWindow()
    image = graphics.Image.new((width,height))
    image.clear()
    image.text((10,0), u'Test')
    window.add_image(image, (width,height))
    window.size = (width, height)
    window.corner_type = 'square'
    window.position = (left,top)
    window.show()
    app_lock = e32.Ao_lock()
    app_lock.wait()
    Why?
    Last edited by jk7800; 2008-05-27 at 13:27.

  2. #2
    Registered User
    Join Date
    Dec 2006
    Posts
    7

    Re: Problem with TopWindow

    Hi, jk7800.
    Try to add:
    window.show()

  3. #3
    Registered User
    Join Date
    Sep 2007
    Posts
    14

    Smile Re: Problem with TopWindow

    Thanks. I forgot about this

    But still, although the window is visible, the text isn't. So what's wrong in my code now?

  4. #4
    Regular Contributor
    Join Date
    Dec 2007
    Location
    Kuopio, Finland
    Posts
    50

    Re: Problem with TopWindow

    Quote Originally Posted by jk7800 View Post
    Thanks. I forgot about this

    But still, although the window is visible, the text isn't. So what's wrong in my code now?
    Check the cordinates, "Text" is outside of the window.

    image.text((0,20), u'Test')
    window.add_image(image, (0,0))

    Above works.

    Ilpo

  5. #5
    Registered User
    Join Date
    Sep 2007
    Posts
    14

    Re: Problem with TopWindow

    Thank you!

Similar Threads

  1. Problem with eglSwapBuffers and heap corruption
    By greatape in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-05-24, 03:35
  2. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  3. WAP service problem on Apache
    By bigg_o in forum Browsing and Mark-ups
    Replies: 3
    Last Post: 2005-04-17, 16:05
  4. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×