That happens when the new string is shorter than the old one, and is not entirely overwritten. There is, probably, a way to clear only that part of the screen before updating the label or padding the new string with spaces, but a better approach in my opinion is to use an TextEntry widget with 'readonly' and not 'focusable' attributes instead of a Label:

########################## ##### OPTIONS PAGE ##### ########################## my $EMAIL; $w{2}->add( undef, 'Label', -y => -10, -text => "Please add email address here below in the event that the results wil +l be mailed to you(Optional)\n" ); my $temp; my $ent1; $w{2}->add( undef, 'Buttonbox', -y => -7, -buttons => [ { -label => " [EMAIL] ", -value => 1, -onpress => sub { my $cui = shift()->root; $EMAIL = $cui->question("PLEASE ENTER EMAIL:"); if ($EMAIL) { $ent1->text("Address: $EMAIL"); } else { $cui->dialog("Question cancelled."); } }, }, ], ); $ent1 = $w{2}->add( "ent1", "TextEntry", -y => -5, -width => 100, -readonly => 1, -focusable => 0, );

Regards, Stefan


In reply to Re^4: Difficulty with Curses by stefbv
in thread Difficulty with Curses by perlassassin27

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.