|
Forum Index : Microcontroller and PC projects : Micromite - Displaybox and line breaks
| Author | Message | ||||
| rhiemann Newbie Joined: 24/11/2017 Location: GermanyPosts: 12 |
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" |
||||
| disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 1044 |
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: AustraliaPosts: 1116 |
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: AustraliaPosts: 3308 |
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 |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |