ListCell ignores setMaxWidth value

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: fx2.1
    • Component/s: javafx
    • Environment:

      2.1-b14

      I want to limit list cells in width. How can I do that?

      Direct approach doesn't work:

              Callback<ListView<Object>, ListCell<Object>> cellFactory
                      = new Callback<ListView<Object>, ListCell<Object>>() {

                  @Override
                  public ListCell<Object> call(ListView<Object> p) {
                      return new ListCell() {
                          
                          {
                              setText("abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz ");
                              setMinWidth(100);
                              setMaxWidth(100);
                          }
                      };
                  }

              };

            Assignee:
            Unassigned
            Reporter:
            Alexander Kuznetcov (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported: