Marmalade SDK: Add a Label

We have to insert into our .ui file the label properties:

  name            "Hello_World_label"
  pos             { 50, 50 }
  sizeToContent   true
  font            "times"
  textColour      { 0,0,255 }
  caption         "Hello, World!"

And in our code, we have to add this code:

        // Load ui group which contains the specification for the label 
 // as well as the font

 // Clone label from loaded resource
 CIwUILabel* pLabel = (CIwUILabel*) CIwUIElement::CreateFromResource("Hello_World_label");
 // Add the label to the UIView singleton
Marmalade SDK: Add a Label Marmalade SDK: Add a Label Reviewed by Unknown on 22:27 Rating: 5

No hay comentarios:

Con la tecnología de Blogger.