×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Sep 2009
    Location
    Napoli - Italy
    Posts
    14

    Separate screen into two parts (one fixed)

    hi,
    i have to separate then screen into two parts.
    The first is the main, with text and vertical scrollbar.
    The second, more little (about two lines), must be always on the bottom of display (fixed).
    Who can I do this?
    Thank you.
    Antonio GIULIANA
    www.antoniogiuliana.it

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Separate screen into two parts (one fixed)

    Hi,

    I'm not sure I understand exactly but you can set appuifw.app.screen to 'large'; that way only the application's body and softkey labels are visible.

    Perhaps it would help if you drew us a picture of what you want the screen to look like exactly. Or if you have a screenshot, that's even better.

  3. #3
    Registered User
    Join Date
    Sep 2009
    Location
    Napoli - Italy
    Posts
    14

    Re: Separate screen into two parts (one fixed)

    Excuse me but I'm Italian.
    You can find an image of screenshot here: http://img38.imageshack.us/img38/5635/senzanome1j.jpg
    Thank you
    Antonio GIULIANA
    www.antoniogiuliana.it

  4. #4
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Separate screen into two parts (one fixed)

    It's not possible to have that fixed part above menu1 and menu2, unfortunately. Not unless you draw everything on a canvas and only modify the top (the part with the scroll bar, which you would also have to draw).

  5. #5
    Registered User
    Join Date
    Sep 2009
    Location
    Napoli - Italy
    Posts
    14

    Re: Separate screen into two parts (one fixed)

    Ok, but I dont't understand very well how can I modify only the top (the part with the scroll bar).
    When I put a long text in the main part (on the top), the scrollbar scroll everything, also the part on the bottom...
    Antonio GIULIANA
    www.antoniogiuliana.it

  6. #6
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Separate screen into two parts (one fixed)

    The only way to do it is if you display everything on a canvas. That means you have to draw the text (or whatever) and the fixed area and the scrollbar yourself. That way you can modify whatever part you want while the rest stays the same. It's not easy.

  7. #7
    Registered User
    Join Date
    Jun 2009
    Posts
    3

    Re: Separate screen into two parts (one fixed)

    Very simple example of how to divide the screen

    Code:
    from graphics import *
    from key_codes import *
    import e32, appuifw
    
    img=None
    
    appuifw.app.screen='normal'
    
    def handle_redraw(rect):
        if img:
            canvas.blit(img)
    appuifw.app.body=canvas=appuifw.Canvas(redraw_callback=handle_redraw)
    img=Image.new(canvas.size)
    
    labeltext=u'Here is the top half of the window'
    textrect=img.measure_text(labeltext, font='normal')[0]
    text_img=Image.new((textrect[2]-textrect[0],textrect[3]-textrect[1]))
    text_img.clear(0)
    text_img.text((-textrect[0],-textrect[1]),labeltext,fill=0xffffff,font='normal')
    labeltext2=u'Here is the bottom half of the window'
    textrect=img.measure_text(labeltext2,font='normal')[0]
    text_img2=Image.new((textrect[2]-textrect[0],textrect[3]-textrect[1]))
    text_img2.clear(0)
    text_img2.text((-textrect[0],-textrect[1]),labeltext2,fill=0xffffff,font='normal')
    
    
    running=1
    
    while running:
        img.clear(0)
        img.blit(text_img, (0,0))
        img.blit(text_img2, (0,-30))
        handle_redraw(())

Similar Threads

  1. Replies: 5
    Last Post: 2008-09-26, 15:21
  2. Replies: 10
    Last Post: 2008-09-24, 12:06
  3. from full screen to normal screen
    By Skygyl in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-08-21, 06:56
  4. How to know the current view is an Editable Screen
    By jobincantony in forum Symbian User Interface
    Replies: 1
    Last Post: 2008-04-07, 07:00
  5. Redrawing parts of the screen on a 6310i
    By cs6c in forum Mobile Java General
    Replies: 0
    Last Post: 2002-12-02, 10:38

Posting Permissions

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