Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • davidj6
    replied
    Yes and no. If you want to change title width because a title is wrapping, you can turn wrapping off. Otherwise, make sure the column holding the title is the width you want. IF you still have trouble consider posting a full test case.

    Leave a comment:


  • dindeman
    replied
    Hi davidj6.

    Do you mean

    Code:
    formItem.setWrapTitle(false);
    formItem.setTitle("<span style=\"width:200px\">foobar</span>");
    ?

    That didn't change anything for me.

    Regards,
    Luc

    Leave a comment:


  • davidj6
    replied
    Normally the title width is related to the column where it resides. You can turn title wrapping off if that's an issue.

    Leave a comment:


  • dindeman
    replied
    Any idea why

    Code:
    formItem.setTitle("<span style=\"color:green\">foobar</span>");
    works but

    Code:
    formItem.setTitle("<span style=\"width:200px\">foobar</span>");
    doesn't?

    Any suggestions as how to set the width of a FormItem's title would be greatly appreciated.
    Regards,
    Luc

    Leave a comment:


  • svjard
    replied
    That would only work for the title. You need to set the box style.

    Leave a comment:


  • zbc
    replied
    UNFORTUNATELY ,dears, the in-line style does not work here, soo my code:
    Code:
            name = new TextItem("name");
            String value = "<span style=\"color:#FFA500\">My orange string.</span>";
            name.setValue(value);
    in the text box, just display the whole string including html tag. any suggestion?

    Leave a comment:


  • svjard
    replied
    dczech is correct, and setTextBoxStyle yes.

    Leave a comment:


  • dczech
    replied
    You can inline the CSS style too.
    Code:
    String orangeString = "<span style=\"color:#FFA500\">My orange string.</span>";
    It's a hack, but it can be useful in the short term.

    Leave a comment:


  • zbc
    replied
    in fact, i what to change the color of the text in text box, not the title, i guess, setTextBoxStyle method maybe work, right?

    Leave a comment:


  • svjard
    replied
    Yes, you need to define the CSS Style.

    Leave a comment:


  • zbc
    replied
    thanks do you mean that i need to define css style?

    Leave a comment:


  • svjard
    replied
    You can use setTitleStyle(), there are other styling methods as well.

    Leave a comment:


  • zbc
    started a topic how to change the font color of TextItem.

    how to change the font color of TextItem.

    as title, i can not find such method as setFontColor(...), who can tell me how to do that?
    thanks.
Working...
X