screen with titlebar

28 views
Skip to first unread message

Frank L Tian

unread,
May 26, 2009, 7:00:32 AM5/26/09
to blackberry-dev
Hi everyone,

I made a custom screen which has a titlebar, so I invoked
setPositionDelegate() to put the delegate manager a bit lower in order
to show the titlebar.

But when I click on the screen(9500 touch screen), it seems an wrong
coordinate was transmited into the delegate. for example, if click on
a ChoiceField, it doesn't show the choice options, but it does if you
click at a little below the ChoiceField.

I think the problem is in sublayout():
Code:

protected void sublayout(int width,int height){
super.sublayout(width,height);
setPositionDelegate(0,titlebar.getHeight());
layoutDelegate(width,height-titlebar.getHeight());
setExtent(width,height);

}

Anyone knows what the problem is? Thanks in advance.

Taigoo Zhang

unread,
May 26, 2009, 10:40:10 AM5/26/09
to blackberry-dev
Hi, Frank
It is correct for your idea, but you call setPositionDelegate maybe
wrong, please use :
setPositionChild();
layoutChild();

Frank L Tian

unread,
May 26, 2009, 10:55:18 PM5/26/09
to blackbe...@googlegroups.com
I tried your way, but the result is still the same.That proved what I
think: In fact setPositionDelegate() invokes setPositionChild(),
because delegate is the only one child in a screen, it is just a
alias.

2009/5/26 Taigoo Zhang <Con...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages