-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
I am trying to understand and learn how to create my own custom
components for my flex based applications and have ran into a problem
I can not resolve. My custom component works if nothing has been
placed on the stage but it will not display if I place a panel on the
stage. Here is my code:

package myComponents {
  import mx.controls.Label;
  public class SelectSchoolBuildingsLabel extends Label {
    private function initComponent():void {
      var SchoolBuildingLabel:Label = new Label();
      SchoolBuildingLabel.text = "Select School Building";
    }
  }
}

In my mxml file if I remove the panel component on the stage so the
only code is the mx:application I can insert
<myComponents:SelectSchoolBuildingsLabel /> which will display the
label with the associated text, however if I insert the following code
I will not get the label on the screen

<mx:Panel {Options set are layout, id, title, right, left, top and
bottom}>
  <mx:VBox>
    <mx:HBox paddingLeft="10" paddingTop="10">
      <mx:Label text="mx:Label Select School Building" />
      <myComponents:SelectSchoolBuildingsLabel />
    </mx:HBox>
  </mx:VBox>
</mx:Panel>

I do get the mx:Label being displayed however myCompoent is not being
displayed. What have I missed. My idea for this component is to also
include a combo box which will list the available school buildings for
a specific school corporation.

Suggestions and/or Ideas?

 


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iQEVAwUBRtVL0HnjLHMPlkANAQIiuwf9H/KSnZcAn6OdZerC6sLpjNtDkWEhff6S
x2kGMVUcNAJMVDo1Ggq/hXUtiDeCN8GBqeeK5eOrTuR9ejnljyFyrLSBL0SAxdgS
1AGy6QsSEW2o8FtbmZPJROdNl/o0moXfoMBcF05h5F/1/SE2lS0Kru1ecgKAJ+8K
wJhnFTye/1tubBQQiyGstGuCo9uyenfvpGkMQJCZfWaaHMLgIDb4alsRSyiVEY5U
/TlZl8aFbhX9qplwj5K+mzQO9RUAbXDtYnvhRwXdokQl2V87UxqzlvkO8mNLLPzj
UJu49fIMNFpws++nnKttJUpPNCC7GIoarz4G3YaaD4yy3+QdHe54Zw==
=6HlH
-----END PGP SIGNATURE-----


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply via email to