drawlabel issue, old text remains in label

Beta Testing discussion on Visual TFT Software.
Post Reply
Author
Message
Nemena
Posts: 203
Joined: 07 Mar 2005 20:32
Location: Hungary

drawlabel issue, old text remains in label

#1 Post by Nemena » 24 Jan 2011 16:15

Hi all, I bought mikrommb board with visual tft and I'm stuck at the beginning.
I try to change the caption of a label, but the old text stays under the new one. If I change the caption of a button, the old one disappears. Any help is appriciated.
project is attached:
Best Regards:
Peter
Attachments
TFT.rar
(206.58 KiB) Downloaded 313 times

User avatar
nlukic
mikroElektronika team
Posts: 66
Joined: 06 Mar 2009 10:46

Re: drawlabel issue, old text remains in label

#2 Post by nlukic » 24 Jan 2011 16:47

Hello, Nemena

Text is not updated as you type, but on ENTER press, or when you click on another property in Object Inspector.

Regards,
nlukic

mikroElektronika team

Nemena
Posts: 203
Joined: 07 Mar 2005 20:32
Location: Hungary

Re: drawlabel issue, old text remains in label

#3 Post by Nemena » 24 Jan 2011 18:44

Hello nlukic,

I'm not talking about the editor window.
IF you open the project, you see there is a button on the screen and 4 labels.
On click event the caption of the button and the labels should change.
The caption of the button changes fine, but the old text of the label remains below the new text on the mikrommb 18fj board.

Nemena
Posts: 203
Joined: 07 Mar 2005 20:32
Location: Hungary

Re: drawlabel issue, old text remains in label

#4 Post by Nemena » 26 Jan 2011 08:07

Has anybody tried my project?

User avatar
nlukic
mikroElektronika team
Posts: 66
Joined: 06 Mar 2009 10:46

Re: drawlabel issue, old text remains in label

#5 Post by nlukic » 26 Jan 2011 10:24

Hello,

You can not erase label (or other object) by simple calling draw function. You need do erase old text manually. The simplest way to do this is to add a box behind a labels, and each time you want to draw labels, first call DrawBox(Box1), than DrawLabels...
I'm sending you yours changed example in attachment.

Best Regards
Attachments
TFT.rar
(230.03 KiB) Downloaded 328 times
nlukic

mikroElektronika team

Nemena
Posts: 203
Joined: 07 Mar 2005 20:32
Location: Hungary

Re: drawlabel issue, old text remains in label

#6 Post by Nemena » 01 Feb 2011 13:52

That is a bit complicated isn't it?
How come the caption of a button can be changed without this procedure and the caption of a label not?

User avatar
nlukic
mikroElektronika team
Posts: 66
Joined: 06 Mar 2009 10:46

Re: drawlabel issue, old text remains in label

#7 Post by nlukic » 02 Feb 2011 12:16

There is conceptual difference between button and label object and the way it is draw. You always know what is behind text that placed on button, so you can redraw it as well, but you can not know what is behind label so you can not erase all behind it like that. But, we can put a property in Label object, called for example, transparent so you can turn it on and off.


Regards,
nlukic

mikroElektronika team

Nemena
Posts: 203
Joined: 07 Mar 2005 20:32
Location: Hungary

Re: drawlabel issue, old text remains in label

#8 Post by Nemena » 13 Apr 2011 11:12

The attached project does not work for me on mikrommb board. I get the same numbers for x_max and y_min.
Could someone tell me why??
I've spent a lot of time trying.
thank you!
Attachments
probe.rar
(210.97 KiB) Downloaded 270 times

User avatar
tihomir.losic
mikroElektronika team
Posts: 2138
Joined: 02 Dec 2009 14:16
Location: Serbia
Contact:

Re: drawlabel issue, old text remains in label

#9 Post by tihomir.losic » 20 Apr 2011 12:14

Hello,

I answered you here:
http://www.mikroe.com/forum/viewtopic.php?f=161&t=31086

Best regards,

Losic Tihomir
mikroElektronika [Support team]

Post Reply

Return to “Visual TFT Beta Testing”