×
Namespaces

Variants
Actions

Archived:LCDUI CustomItem content remains blank when appended to a Form before setting the Form as current Displayable (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
CompatibilityArticle
Created: User:Technical writer 1 (14 Sep 2007)
Last edited: hamishwillee (13 Aug 2013)

Contents

Overview

A Form containing a CustomItem object is set to be the current Displayable. CustomItem’s content remains blank although it should be visible.

Description

The CustomItem.paint() method is not called when the Form becomes current the Displayable. However, the method will be called when any other paint event will be triggered after the Form gets displayed.


How to reproduce

  Form form = new Form("CustomItem");
MyCustomItem myItem = new MyCustomItem();
 
form.append(myItem);
Display.getDisplay(this).setCurrent(form);

Solution

There is currently no solution. However, the issue can be avoided if Display.getDisplay() is called at least once during the MIDlet’s lifecycle before creating the CustomItem object, e.g. in the beginning of the MIDlet’s constructor.

  Form form = new Form("CustomItem");
Display.getDisplay(this).setCurrent(form);
 
MyCustomItem myItem = new MyCustomItem();
form.append(myItem);
This page was last modified on 13 August 2013, at 09:03.
58 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×