I am new to the HS1106 GLCD display. So trying to learn how to use it.
Among other things, I am trying to make a bar graph.
I draw the outer frame with command: box (18,38,115,46)
I make the bar graph with the command: FilledBox (20,40,x,44)
As long as the bar graph gets longer (x gets bigger), there is no problem. But the other way the problem show up as the FilledBox command simply draws on top of the other boxes.
Is there a smart and simple way to refresh the bar graph?
Gert K.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am new to the HS1106 GLCD display. So trying to learn how to use it.
Among other things, I am trying to make a bar graph.
I draw the outer frame with command:
box (18,38,115,46)
I make the bar graph with the command:
FilledBox (20,40,x,44)
As long as the bar graph gets longer (x gets bigger), there is no problem. But the other way the problem show up as the FilledBox command simply draws on top of the other boxes.
Is there a smart and simple way to refresh the bar graph?
Gert K.
I am not sure I understand the issue.
Can you post some photos?
Last edit: Anobium 2025-01-09
Taking a section of program from https://github.com/GreatCowBASIC/Demonstration_Sources/blob/main/GLCD_Solutions/GLCD_Gauge_Solutions/KS0108_Gauge_Solutions/GaugeDemo%20-%2048_24%20-%20millis.gcb#L232
This section of the program draws boxes to manage the state. The dimensions of graph is 98, 9 to 127, 14.
This draws a number of boxes dependent on
value
.So, you will need to do the same. Draw multiple boxes and the outer frame.
I just tested with the method you show in your post above and it works perfectly. I couldn't get my head around it.
Thank you very much!!
Last edit: Gert Klemmensen 2025-01-10
Excellent.
We only wrote this program ... this week!!! Amazing timing.