I ran accross something I didn't realize today.
I have a small app I'm writing. One portion has a multiline, read only textbox for display. There are only three fields for each record, Name, Registration #, and support email.
To save the records from the dialog, I dim three fixed length strings
DIM a AS STRING * 35
DIM b AS STRING * 30
DIM c AS STRING * 30
Then I load the data into the variables, and save them as below:
apprecord = a + "," + b + "," + c
Then, I save apprecord.
To display the records in the multiline text box, I dim 3 strings of the same lengths, use PARSE$ and the field number I want to pull the data from the record, and store them in a variable like this:
FOR count = 1 to n (value of n obtained w/FILESCAN command)
displayrecord$ = displayrecords + a + $TAB + b + $TAB + c + $CRLF
NEXT n
Then to display CONTROL SET TEXT blah, blah, displayrecord$
What I've found is the display of the records isn't linear, even though the records are the same size. Here is what I mean; if my company name is 26 characters, the reg code 10, and the email whatever. Depending on the name of the company, and the length of the registration code, the records are not linearly displayed, even though the exact same number of characters are in each comparative field (assume a $TAB inserterted between the company and reg code, and the reg code and email:
ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890 [email protected]
abcdefghijklmnopqrstuvwxyz 1234567890 [email protected]
Is there a relatively simple way to overcome this? I've been scratching my head for a few hours, now I'm turning to the big dogs. Thanks in advance.
I have a small app I'm writing. One portion has a multiline, read only textbox for display. There are only three fields for each record, Name, Registration #, and support email.
To save the records from the dialog, I dim three fixed length strings
DIM a AS STRING * 35
DIM b AS STRING * 30
DIM c AS STRING * 30
Then I load the data into the variables, and save them as below:
apprecord = a + "," + b + "," + c
Then, I save apprecord.
To display the records in the multiline text box, I dim 3 strings of the same lengths, use PARSE$ and the field number I want to pull the data from the record, and store them in a variable like this:
FOR count = 1 to n (value of n obtained w/FILESCAN command)
displayrecord$ = displayrecords + a + $TAB + b + $TAB + c + $CRLF
NEXT n
Then to display CONTROL SET TEXT blah, blah, displayrecord$
What I've found is the display of the records isn't linear, even though the records are the same size. Here is what I mean; if my company name is 26 characters, the reg code 10, and the email whatever. Depending on the name of the company, and the length of the registration code, the records are not linearly displayed, even though the exact same number of characters are in each comparative field (assume a $TAB inserterted between the company and reg code, and the reg code and email:
ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890 [email protected]
abcdefghijklmnopqrstuvwxyz 1234567890 [email protected]
Is there a relatively simple way to overcome this? I've been scratching my head for a few hours, now I'm turning to the big dogs. Thanks in advance.
Comment