×

Discussion Board

Results 1 to 4 of 4

Hybrid View

  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    13

    Fixed title for a scrollable shell

    Hi,

    I want to produce a title element for a shell that will not be scrolled out of screen when the user scrolls down.
    an example can be found in facebook widset, and in the "Library" located on the dashboard.
    I already tried using a flow that contains flow(for title) and scrollable with flow in it(for the content of the window), but it doesnt work well, at least no as I see that it works for facebook widset.

    any ideas?

    Thanks,
    Junam.

  2. #2
    Registered User
    Join Date
    Dec 2008
    Posts
    13

    Re: Fixed title for a scrollable shell

    Code:
    Flow flow = new Flow(getStyle("default"));
    	flow.setPreferredSize(-100, -100);
    
    	Label header = new Label(getStyle("default"), "I am header text");
    	header.setFlags(VISIBLE|LINEFEED);
    	header.setPreferredWidth(-100);
    	
    	flow.add(header);
    	
    	
    	Flow flow2 = new Flow(getStyle("default"));
    	flow2.setPreferredWidth(-100);
    	
    	Text text = new Text(getStyle("default"), "some text some textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome text some textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome textsome text");
    	text.setFlags(VISIBLE|LINEFEED);
    	text.setPreferredWidth(-100);
    	
    	flow2.add(text);
    	
    	Scrollable scroll = new Scrollable(getStyle("default"), flow2);
    	
    	flow.add(scroll);
    	
    	Shell shel = new Shell(flow);
    	shel.setStyle(getStyle("maxi"));
    	shel[0] = shel[0][0];
    	pushShell(shel);
    This may help...

  3. #3
    Registered User
    Join Date
    Aug 2008
    Posts
    13

    Re: Fixed title for a scrollable shell

    Thanks jamapag,

    your code example works fine, it seems that I missed the line:
    shel[0] = shel[0][0];

    It will be great if you can explain.

    Many thanks,
    Junam.

  4. #4
    Registered User
    Join Date
    Dec 2008
    Posts
    13

    Re: Fixed title for a scrollable shell

    Quote Originally Posted by junam View Post
    Thanks jamapag,

    your code example works fine, it seems that I missed the line:
    shel[0] = shel[0][0];

    It will be great if you can explain.

    Many thanks,
    Junam.
    This code place flow over automatic Scrollable created by Shell.
    Try call dumpTree(shell) function without and with this code, and you'll see the difference.
    Last edited by jamapag; 2009-03-11 at 15:27.

Similar Threads

  1. Display Title Bug?
    By jose_79 in forum Mobile Java General
    Replies: 0
    Last Post: 2007-12-18, 19:04
  2. How to update an application title in S90?
    By e5anbr in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-06-28, 11:22
  3. How to get rid of Canvas title?
    By alchabitius in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2003-05-05, 16:22
  4. Title bars
    By fonedev12 in forum Symbian User Interface
    Replies: 2
    Last Post: 2002-05-08, 19:20
  5. Title bars
    By fonedev12 in forum Symbian C++
    Replies: 1
    Last Post: 2001-11-08, 17:24

Posting Permissions

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