Jump to content

how to implement about AutoScroll


A_MU

Recommended Posts

HI, Frarshad,

FIRST,My Englishis very pool,

I want to implement Autoscroll with UniMemo in WEB MODE,FOR example,show announcement to user,

i have test case: use a timmer,

-----------------------------------------------------------------------------

procedure TMainForm.UniTimer1Timer(Sender: TObject);

var

i:integer;

begin

i:=0;

if uniMemo_announce.Lines.Count=0 then uniMemo_announce.Lines:=Announce_str;

repeat

if uniMemo_announce.Lines.Count=1 then exit;

uniMemo_announce.Lines.Strings:=uniMemo_announce.Lines.Strings[i+1];

inc(i);

until i=uniMemo_announce.Lines.Count-1;

uniMemo_announce.Lines.Delete(i);

uniMemo_announce.Refresh;

end;

// PS:Announce_str IS A GLOBAL VARIABLE

-----------------------------------------------------------------------------------

COMPILE IS CORRECT;but no anything effect in runtime;

in the other case:

procedure TMainForm.UniTimer1Timer(Sender: TObject);

begin

unilabel1.caption:=datetimetostr(now);

end;

in runtime,this is effect that i need;

why?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...