Problem with label (Glcd V2.70, Mikropascal)

General discussion on Visual GLCD Software.
Post Reply
Author
Message
lestef
Posts: 2
Joined: 09 Jul 2013 22:09

Problem with label (Glcd V2.70, Mikropascal)

#1 Post by lestef » 09 Jul 2013 22:30

Hello,

I have a probleme with Label, the texts are superimposed on each refresh
I dont have the function "Clearlabel" in driver.pas, just "Drawlabel"

Pic18F4685 and display controller NT7108C

User avatar
dejan.odabasic
mikroElektronika team
Posts: 2649
Joined: 30 Apr 2012 14:20

Re: Problem with label (Glcd V2.70, Mikropascal)

#2 Post by dejan.odabasic » 11 Jul 2013 15:15

Hello,

You need manually to clear the old value before writing the new label with new caption.
You can clear old value by draw rectangle with background color, or you can write UpdateLabel function.

You'll need to sent address of label and new caption to UpdateLabel function.
- change the font color to background color
- call DrawLabel function
- change caption of label
- change the font color back to text color
- call DrawLabel function.

Best regards.

lestef
Posts: 2
Joined: 09 Jul 2013 22:09

Re: Problem with label (Glcd V2.70, Mikropascal)

#3 Post by lestef » 16 Jul 2013 09:37

Hello,

Thanks for your reply.

I wrote this code and it work fine, i found this code in this topic:http://www.mikroe.com/forum/viewtopic.php?f=152&t=50835 and i adapted the mikroC code to mikroPascal code

Code: Select all

procedure ClearLabel(ALabel : ^TLabel);
  begin
  Glcd_Set_Font_Adv(ALabel^.FontName, 0,0);
  Glcd_Write_Text_Adv(ALabel^.Caption, ALabel^.Left, ALabel^.Top);
  end;
Best regards

Post Reply

Return to “Visual GLCD General”