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
drawlabel issue, old text remains in label
drawlabel issue, old text remains in label
- Attachments
-
- TFT.rar
- (206.58 KiB) Downloaded 313 times
Re: drawlabel issue, old text remains in label
Hello, Nemena
Text is not updated as you type, but on ENTER press, or when you click on another property in Object Inspector.
Regards,
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
mikroElektronika team
Re: drawlabel issue, old text remains in label
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.
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.
Re: drawlabel issue, old text remains in label
Has anybody tried my project?
Re: drawlabel issue, old text remains in label
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
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
mikroElektronika team
Re: drawlabel issue, old text remains in label
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?
How come the caption of a button can be changed without this procedure and the caption of a label not?
Re: drawlabel issue, old text remains in label
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,
Regards,
nlukic
mikroElektronika team
mikroElektronika team
Re: drawlabel issue, old text remains in label
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!
Could someone tell me why??
I've spent a lot of time trying.
thank you!
- Attachments
-
- probe.rar
- (210.97 KiB) Downloaded 270 times
- tihomir.losic
- mikroElektronika team
- Posts: 2138
- Joined: 02 Dec 2009 14:16
- Location: Serbia
- Contact:
Re: drawlabel issue, old text remains in label
Hello,
I answered you here:
http://www.mikroe.com/forum/viewtopic.php?f=161&t=31086
Best regards,
Losic Tihomir
I answered you here:
http://www.mikroe.com/forum/viewtopic.php?f=161&t=31086
Best regards,
Losic Tihomir
mikroElektronika [Support team]