View Single Post
Old 12-07-2007, 12:02 PM   #12
predator
Knows Where the Search Button Is
 
Join Date: Nov 2007
Model: 8700c
PIN: N/A
Carrier: AT&T
Posts: 32
Default

Thank you Doesn't getPreferredheight just return the preferred height rather than setting it? I already have the screen height saved in a variable called "screenHeight" and am now overriding the gerPreferredheight function as follows.

Code:
public int getPreferredHeight()
            {
                return screenHeight;
            }
That doesn't seem to work, though. Complete code for the new manager is as follows.

Code:
        class NewVerticalFieldManager extends VerticalFieldManager 
        {
            NewVerticalFieldManager() 
            { 
                super();
            }
            public int getPreferredHeight()
            {
                return screenHeight;
            }
            
            protected void paintBackground(Graphics graphics) 
            {        
                // Sets the BackgroundColor
                graphics.setBackgroundColor(Color.MEDIUMAQUAMARINE);
                
                // Clears the entire graphic area to the current background
                graphics.clear();
                //super.paint(graphics);
            }
        }
I also tried to have gerPreferredHeight return 240 directly, which is the secreen size on blackberry 8700. Still nothing. What am i missing?
Offline   Reply With Quote