• Home
  • Raw
  • Download

Lines Matching full:label

231 …ea. You can set the background color, text display style, and long text display effect for a label.
246 …p757119532556"><a name="p757119532556"></a><a name="p757119532556"></a>Sets text for the label.</p>
251 …3105514"><a name="p85721653105514"></a><a name="p85721653105514"></a>Obtains text of the label.</p>
256 …16557"><a name="p1757215316557"></a><a name="p1757215316557"></a>Sets the label mode, such as trun…
261 …572853175514"><a name="p4572853175514"></a><a name="p4572853175514"></a>Obtains the label mode.</p>
363 UILabel* label = new UILabel();
364 label->SetPosition(x, y);
365 label->Resize(width, height);
371 label->SetFont("SourceHanSansSC-Regular.otf", 30);
377 label->SetText("label");
380 4. Verify the label size and display effect, as shown in the following figure.
390 UILabel* label = new UILabel();
391 label->SetPosition(x, y);
392 label->Resize(width, height);
398 label->SetFont("SourceHanSansSC-Regular.otf", 30);
404 label->SetStyle(STYLE_BACKGROUND_COLOR, Color::Gray().full);
405 label->SetStyle(STYLE_BACKGROUND_OPA, 127);
406 label->SetText("Label");
409 4. Verify that the background color of the label is **Gray**, as shown in the following figure.
419 UILabel* label = new UILabel();
420 label->SetPosition(x, y);
421 label->Resize(width, height);
427 label->SetFont("SourceHanSansSC-Regular.otf", 30);
433 label->SetStyle(STYLE_BACKGROUND_COLOR, Color::Gray().full);
434 label->SetStyle(STYLE_LETTER_SPACE, 5);
435 label->SetText("Label");
438 4. Verify that the letter spacing is **5** pixels on the label, as shown in the following figure.
445 Regarding too long text, the size of a label can be automatically adjusted based on the text, or th…
450 UILabel* label = new UILabel();
451 label->SetPosition(x, y);
452 label->Resize(width, height);
458 label->SetFont("SourceHanSansSC-Regular.otf", 30);
461 3. Set the font color to **Gray** and enable the label size to adapt to the text.
464 label->SetStyle(STYLE_BACKGROUND_COLOR, Color::Gray().full);
465 label->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT);
466 label->SetText("123\n567890");
469 4. Verify that the label size adapts to the text, as shown in the following figure.
476 In ellipsis mode, an ellipsis \(...\) is displayed at the end of the label if the text cannot be …
481 UILabel* label = new UILabel();
482 label->SetPosition(x, y);
483 label->Resize(width, height);
489 label->SetFont("SourceHanSansSC-Regular.otf", 30);
495 label->SetStyle(STYLE_BACKGROUND_COLOR, Color::Gray().full);
496 label->SetLineBreakMode(UILabel::LINE_BREAK_ELLIPSIS);
497 label->SetText("123567890");
500 4. Verify that the ellipsis mode has taken effect on the label, as shown in the following figure.
512 UILabel* label = new UILabel();
513 label->SetPosition(x, y);
514 label->Resize(width, height);
520 label->SetFont("SourceHanSansSC-Regular.otf", 30);
526 label->SetStyle(STYLE_BACKGROUND_COLOR, Color::Gray().full);
527 label->SetStyle(STYLE_BACKGROUND_OPA, 127);
528 label->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
529 label->SetText("123567890");
532 4. Verify that the text is scrolling on the label, as shown in the following figure.