Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:23 10 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Micromite - Displaybox and line breaks

Author Message
rhiemann
Newbie

Joined: 24/11/2017
Location: Germany
Posts: 12
Posted: 08:36am 24 Nov 2017
Copy link to clipboard 
Print this post

I am using micromite plus version 5.0405 with displayboxes.
The behaviour seems to be not correct if I am using line breaks (~)

A simple program with 6 display boxes, with 3 different font sizes. 3 with line breaks (~) and 3 without.
Multiple rows should work.

Image upload did not work so I have to write the content of the message boxes here:
behaviour incorrect, last characters are not printed, size of displaybox is big enough (display 800x480)

"ABCDEFGHIJKLMNOPQRSTUVWXYZ~ABCDEFGHIJKLMNOPQRSTUVWXYZ~ABCDEFGHIJKLMNOPQRSTUVWXYZ"

font 1
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABC

font 2
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJK

font 3
ABCDEFGHIJKLMNOPQRSTUVWXYZ
A

same text but without ~ for new lines
behaviour correct, stops when display edge is reached
"ABCDEFGHIJKLMNOPQRSTUVWXYZ~ABCDEFGHIJKLMNOPQRSTUVWXYZ~ABCDEFGHIJKLMNOPQRSTUVWXYZ"

font 1
ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDE

font 2
ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL

font 3
ABCDEFGHIJKLMNOPQRSTUVWXYZAB


The page break works but last characters are not printed. It is always limited to the amount of characters allowed for one row (minus amount of ~ characters)
String limit of 255 should not be the reason.

Any ideas?
Thanks
Rico

Sample program:

Const Text1 = 21
Const Text2 = 22
Const Text3 = 23
Const Text4 = 24
Const Text5 = 25
Const Text6 = 26

FONT 1: GUI DISPLAYBOX Text1, 10, 100, 460, 100, RGB(black), RGB(255,255,255)
FONT 2: GUI DISPLAYBOX Text2, 10, 200, 460, 100, RGB(black), RGB(255,255,255)
FONT 3: GUI DISPLAYBOX Text3, 10, 300, 460, 100, RGB(black), RGB(255,255,255)
FONT 1: GUI DISPLAYBOX Text4, 10, 400, 460, 100, RGB(black), RGB(255,255,255)
FONT 2: GUI DISPLAYBOX Text5, 10, 500, 460, 100, RGB(black), RGB(255,255,255)
FONT 3: GUI DISPLAYBOX Text6, 10, 600, 460, 100, RGB(black), RGB(255,255,255)

CtrlVal(Text1) = "ABCDEFGHIJKLMNOPQRSTUVWXYZ~ABCDEFGHIJKLMNOPQRSTUVWXYZ~ABCDEFGHIJKLMNOPQRSTUVWXYZ"
CtrlVal(Text2) = "ABCDEFGHIJKLMNOPQRSTUVWXYZ~ABCDEFGHIJKLMNOPQRSTUVWXYZ~ABCDEFGHIJKLMNOPQRSTUVWXYZ"
CtrlVal(Text3) = "ABCDEFGHIJKLMNOPQRSTUVWXYZ~ABCDEFGHIJKLMNOPQRSTUVWXYZ~ABCDEFGHIJKLMNOPQRSTUVWXYZ"
CtrlVal(Text4) = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
CtrlVal(Text5) = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
CtrlVal(Text6) = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
Edited by rhiemann 2017-11-25
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1044
Posted: 03:05am 25 Nov 2017
Copy link to clipboard 
Print this post

Hi Rico,

I see what you mean. Looks like the ~ in the string is not telling the micromite routine that the horizontal character count should be reset when it takes the newline, so even though its a multiline you are limited to total number of characters that would fit on a single line.
MSGBOX function seems to be OK, but DISPLAYBOX looks like it could be a bug.

Regards
Gerry
F4 H7FotSF4xGT
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1116
Posted: 03:38am 25 Nov 2017
Copy link to clipboard 
Print this post

Rico,

Just note that although the tilde character does force a new line in DisplayBox, the manual makes no reference to using it in a DisplayBox, only in a MessageBox.

It would be nice to have the feature in a DisplayBox and as Gerry has said, it looks like just needing the character count reset at the start of the new line. One for Geoff to mull over and comment on.

Cheers,
Doug.

... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3308
Posted: 04:28am 25 Nov 2017
Copy link to clipboard 
Print this post

Thanks guys, it definitely looks like a bug and is on the list for the next version (due in next month).

Geoff
Geoff Graham - http://geoffg.net
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025