|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Topic # 1587 |
Question: LABEL width |
20/10/2007 @ 00:03 by Tuka
|
Hello aldweb,
Will the width of the LABEL be fixed? Do not you change flexible by the width of the letters?
Please try this code. CHECKBOX disappears when I put a LABEL after CHECKBOX.
'LABEL.iBAS {CreatorID "HELO"} {Version "1.0"} {PARSER ON} {CONSOLEFONT OFF} BEGIN A$="0123456789" A$=A$+A$+A$+A$ PRINT A$:PRINT A$:PRINT A$:PRINT A$
CHECKBOX #1,"ABC",1,50,20,16,10 LABEL #2,"1",5,20
LABEL #3,"1",5,43 CHECKBOX #4,"ABC",1,50,43,16,10
WAIT END
It is the screen of my device. http://web01.joetsu.ne.jp/~ootuka/pa/iziBasic/HRCapt20071014064953.GIF |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1 -------- 20/10/2007 @ 19:48 by JoeV
visitor |
Hello Tuka,
I have tried your code and I understand your question. I have changed your code a little to get a better idea of the problem. Try this:
'LABEL.iBAS {CreatorID "HELO"} {Version "1.0"} {PARSER ON} {CONSOLEFONT OFF} BEGIN A$="0123456789" A$=A$+A$+A$+A$ PRINT A$:PRINT A$:PRINT A$:PRINT A$ WAIT CHECKBOX #1,"ABC",1,50,20,46,10 WAIT B$=".........0" : B$=B$+B$+B$+B$+B$+B$+B$ LABEL #2,B$,5,20 WAIT LABEL #3,"1",5,43 WAIT CHECKBOX #4,"ABC",1,50,43,46,10 WAIT END
You made a small error with your checkbox statements but that did not cause your confusion.
It appears Aldweb saves a default minimum number of pixels (or perhaps, characters) for each label statement, up to a maximum of 63. Only Aldweb can tell us for certain how much he reserves.
Regards, JoeV
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2 -------- 20/10/2007 @ 22:04 by Tuka
visitor |
Hello JoeV,
I was able to understand by B$. I seem to set width to a minimum when there is 63 characters of the smallest width. Thank you for repairing my small error. Your message is plain. Thank you.
Tuka |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 3 -------- 30/10/2007 @ 18:21 by aldweb
visitor |
It appears Aldweb saves a default minimum number of pixels (or perhaps, characters) for each label statement, up to a maximum of 63. Only Aldweb can tell us for certain how much he reserves.
This is right, because it is required by Palm OS to have the memory size allocated in the case of an update of the label's text (UPDATELABEL). So, the trick I found was to allocate right from the start 63 or 64 characters including some trailing spaces added to the initial text (as defined in the LABEL statement). Otherwise, I would have had to DESTROY the label before assigning it again even when doing a basic UPDATELABEL.
Then, it is true that some glitches over other objects can appear in the case you update a label's text. If you want to avoid that when it occurs (for objects on the right side of a label), you better use the GPRINT statement, in conjunction with a BOXFILLED statement to first erase the area where the text is. To know which area to erase get it by using the FONTWIDTH statement, the font's height being a fixed value for fonts in Palm OS.
Cheers, aldweb
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 4 -------- 30/10/2007 @ 22:38 by Tuka
visitor |
Hello aldweb,
Thank you for your message. I understood it.
|
|
|
topic active
topic closed
Sticky
New message -
Correct message
Close topic
Make sticky
|
|