Avatar billede coweatcow Nybegynder
11. september 2001 - 22:43 Der er 9 kommentarer og
1 løsning

loading external text (and extending its textbox)

im loading text with loadVariables into a text box and in order to properly use my fine and dandy scroll bar, I need the text box to expand if loaded text is bigger than the original text box. the textbox expands if I just cut and paste text into a predefined text box, but not if I load it in from a text document. any ideas?
Avatar billede lingoman Nybegynder
11. september 2001 - 23:03 #1
Is it perhaps the \'word wrap\' text option that is active ?
Avatar billede coweatcow Nybegynder
11. september 2001 - 23:06 #2
ive experimented with all the possible check boxes associated with text....:(
Avatar billede lingoman Nybegynder
12. september 2001 - 08:24 #3
Once your text has loaded, you\'ll have to check the maxScroll property to see by how many lines your text exceeds the visible text. The purpose of your scrollbar should be just that.

scrollUp/down actions could be as simple as

on (press) {
  if (textField.scroll < textField.maxscroll) {
      textField.scroll++;
  }
}

or

on (press) {
  if (textField.scroll > textField.maxscroll) {
      textField.scroll--;
  }
}
To Control the layout of the dynamic text you can include forced line breaks.
Inserting the \\n  or newline keyword in the external string controls the exact location of your line breaks.

eg.  \"DynamicTextVar = this is\\na test\" displays the string as

this is
a test

I hope this helps :)

regards,  geo

Avatar billede lingoman Nybegynder
12. september 2001 - 08:32 #4
The dimensions of the Dynamic Text Field does not expand automatically to accomodate more lines in the Player, as this only happens in the authoring mode. That is also why we should include scrollbuttons and scrollbar functions if the number of lines change dynamically.
Avatar billede lingoman Nybegynder
16. september 2001 - 08:26 #5
If the text box were able to expand to show all the text, what would be the purpose of your scrollbar ?
Avatar billede coweatcow Nybegynder
21. september 2001 - 14:26 #6
max scroll helps a lot. thanks.
Avatar billede coweatcow Nybegynder
21. september 2001 - 14:28 #7
lingoman...if you post a svar, i can give you some points:)
Avatar billede lingoman Nybegynder
21. september 2001 - 15:06 #8
Thanks,
I am still curious though, what did you intend to use the scroll buttons for if the textField expands to accomodate all text ?

a svar :)
Avatar billede coweatcow Nybegynder
21. september 2001 - 17:00 #9
i didn\\t want to expand the text field, i just wanted to be able to see all the text that was loaded into it when i scrolled. until i understood the maxscroll function i could only scroll through as much text as would fit in my text box, then for example 20 lines loaded into a 10 line text box would scroll, but would only reveal 10 of the 20 lines cutting off my paragraph half way. thanks for your help.
Avatar billede lingoman Nybegynder
21. september 2001 - 17:02 #10
anytime :)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
IT-kurser om Microsoft 365, sikkerhed, personlig vækst, udvikling, digital markedsføring, grafisk design, SAP og forretningsanalyse.

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester