Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-1667

Changing label view's font.fontSize property after view is rendered has no effect.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: iOS

      Description

      {html}<div><p><strong>Environment:</strong> Titanium Developer 1.40 and iPhone
      Simulator (iphone and iphone4). Also tested on iPhone4 device with
      same results.</p>
      <p><strong>Issue:</strong> Changing the fontSize property of a
      label after label is rendered has no effect. The following code
      does not work.</p>
      <p><strong>Example code:</strong> (notice 2 methods for defining
      new font size - neither work)</p>
      <pre>
      <code>var w = Ti.UI.createWindow({backgroundColor:'#fff'});
      var b = Ti.UI.createButton({
      title:'Click Me',
      top:10,
      height:40,
      width:200
      });
      var lab = Ti.UI.createLabel({
      text: 'test',
      top: 150,
      height: 140,
      width: 300,
      font:{fontSize:20},
      color: '#c00',
      backgroundColor: '#ccc'
      });

      w.add(b);
      w.add(lab);

      b.addEventListener('click', function() {
      lab.font = '{fontSize:100}';
      // lab.font.fontSize = 100; // this also doesn't work
      });

      w.open();</code>
      </pre></div>{html}

        Attachments

          Activity

            People

            • Assignee:
              rseagraves Reggie Seagraves
              Reporter:
              k00k k00k
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-1507
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code