A textarea can be created in Oxygene as follows (only Chrome tested so far):
var el := Browser.GetElementById(‘DivTxt’);
txtNA.name := “NameAdr”;
txtNA := Browser.CreateElement(‘textarea’);
txtNA.style := "position: absolute; "
+ "top, left, width, height, font-size, etc” //works w/ normal entries
+ “font-family: ‘Arial’, ‘sans-serif’;” //works
+ "wrap: hard; " //works: inserts LF ($0A)
+ "spellcheck: false; " //DOES NOTHING!!!
+ "overflow: hidden; " //works: No Scroll Bar
+ "outline: none; " //works
+ "border: none; " //works
+ "resize: none; "; //works
el.appendChild(txtNA);
spellcheck: I’ve tried “false” & several other things, but the text area red underlines words (e.g. names, common abbreviations, etc) it does not recognize. Yucky!
wrap: I’ve only tested with Water/Oxygene which uses Chrome. The textarea text (txtNA.value) contains $0A (linefeed), but not ($0D) (carriage return). Does anyone know if the other browsers do the same or do they insert $0D$0A or some other code?
I don’t know but setting the other attributes works. I can solve the problem by creating the textarea with HTML/CSS & assume WASM can get it by ID, but prefer to do all in WASM. Seems strange WASM/Oxygene can set all the other attributes, including such as “placeholder”, but NOT spellcheck? So far, I’ve been able to do nearly all but a tiny amount in WASM with my html file containing very little.
Yea, 1st I tried:
txtNA.spellcheck := “false”; //which did not work, while
txtNA.placeholder := “bunch of text”; //DOES WORK
tried in various ways, e.g. w/o quotes
txtNA.spellcheck := false;
Seems like it ought to work as above or within the style, but can find no way for it to work. BTW, web sez “wrap” is also an attribute, but it works in style.
Ah, that makes sense; one one the downsides of an untyped API such as the JavaScript-based DOM model is that the compiler cant enforce the types or properties (because it doesn’t know them. :(.
I hate HTML/CSS/JS & would like to hang whoever replaced Java Applets with that kludge. 3 different languages with different syntax & putting things in different places. Were it a style thingy it would be “spellcheck: false;” rather than = false. Different comments delimiters, different case sensitivity, just plain different. Gotta keep the social justice warriors happy I guess cuz there is plenty of diversity in HTML/CSS/JS.
–Love you guys & WASM!