06-23-2018 23:10
06-23-2018 23:10
This is ridiculous; never have I used such a poor SDK. Basically, I had a simple request; display text that can be scrolled. here are the problems I found:
Look, I just wanted to make a simple app that displays quotes and you guys made this ridiculously hard. i could do this in 5 minutes using HTML and JS (proper standards). You guys make it SO difficult. Scrolling text should be simple;
Answered! Go to the Best Answer.
06-24-2018 00:34
06-24-2018 00:34
Hej, sometimes developing is frustrating .
But maybe the Dynamic Textarea is a solution for your problem.
Please follow the documentation as a first approach.
Dynamic Textarea
The dynamic-textarea type can be used to create a <textarea> which dynamically adjusts the height depending on the length of the text content. If you change the text content, the element height will automatically re-adjust.
In the following example we define a Template Symbol containing a <textarea> and a <rect>. The <rect> will always appear 15pixels below the <textarea> even if the text content is changed at runtime...
https://dev.fitbit.com/build/guides/user-interface/svg/
06-24-2018 00:34
06-24-2018 00:34
Hej, sometimes developing is frustrating .
But maybe the Dynamic Textarea is a solution for your problem.
Please follow the documentation as a first approach.
Dynamic Textarea
The dynamic-textarea type can be used to create a <textarea> which dynamically adjusts the height depending on the length of the text content. If you change the text content, the element height will automatically re-adjust.
In the following example we define a Template Symbol containing a <textarea> and a <rect>. The <rect> will always appear 15pixels below the <textarea> even if the text content is changed at runtime...
https://dev.fitbit.com/build/guides/user-interface/svg/
06-24-2018 00:43
06-24-2018 00:43
Oh it's mainly this SDK. I have a fair bit of experiencing programming (I made a small music production App in C# for windows phone that has more than 250,000 downloads).
https://www.microsoft.com/en-us/p/beats-yo/9wzdncrfjbsg
The decisions in this SDK are just highly questionable and not at all intuitive. Probably the worst SDK I have used in my time making apps haha. One textarea is more than capable of having all of these properties. It should be waaaay more flexible.
Enough ranting though. Thanks, Ill take a look at that. There doesnt seem to be any documentation on how to set the text dynamically via Javascript though. Using these "set" tags with "to" attributes doesnt have much documentation. How would that go about?
Would it be as simple as document.getElementById('text').to?
How would I reference that "to" field in the href "text" element to make changes via Javascript?
06-24-2018 02:58
06-24-2018 02:58
It‘s pretty simple, just select the item and set the text via JS:
document.getElementById(‘placeholder‘).text = ‘lorem ipsum‘;
06-24-2018 03:03
06-24-2018 03:03
Ok good. See there is no documentation around that, I cant assume referencing the "text" attribute of what is essentially a definition is going to work, as in the example the data actually exists inside this "set" tag which is entirely new to me. Havent seen this in C#, XAML or HTML before.
I'll give it a bash. Ta
06-24-2018 04:42
06-24-2018 04:42
It doesn't work. Still only outputs one line. Even tried adding
rows="20"
text-length="2000"
Still only outputs one row of text using the dynamic text-area
06-24-2018 04:48 - edited 06-24-2018 04:50
06-24-2018 04:48 - edited 06-24-2018 04:50
If I enter the text directly into the XAML it works. If I assign it using javascript is when it only shows one line. If that helps
Its basically not adjusting the height as I add new values. its remembering whatever height it was when the text that was entered into the XAML was present.