|
Post by metro on Apr 15, 2019 8:23:21 GMT -5
I am finding that if the line of text is long enough to wrap then the extra line or part line is not counted hit the button result = 15 but there are 17 on display
lotoflines$="-Added support for the following new format commands for the texteditor. CLS() - empty the control LINES() - return the number of lines of text LINE$(index) - return the line of text at index MODIFIED() - return non zero if the contents have changedams SELECTION$() - return the selected text SELECTALL() - select the entire contents ORIGIN(col,row) - scroll the contents to col,row SETFOCUS() - give the focus to the widget INSERT(var$) - replace the selection/cursor with the contents of var$ LOCATE(x,y,w,h) - reposition the widget ENABLE() - enable the widget DISABLE() - disable the widget SHOW() = make the widget visible HIDE() - make the widget invisible" WindowWidth=900 WindowHeight=650 UpperLeftX=(DisplayWidth-WindowWidth)/2 UpperLeftY=(DisplayHeight-WindowHeight)/2
texteditor #main.edit, 254, 46, 400, 400 button #main.default, "CLICK", [open], UL, 10, 350, 60, 30
open "First LB5 Freeform GUI" for dialog as #main print #main, "font ms_sans_serif 10" [main.inputLoop] 'wait here for input event print #main.edit, lotoflines$ wait
[open] #main.edit selectall() #main.edit origin(3,3) #main.edit COPY() numlines=#main.edit LINES() #main.edit numlines wait'untitled.bas
|
|
|
Post by Carl Gundel on Apr 15, 2019 10:07:39 GMT -5
I am finding that if the line of text is long enough to wrap then the extra line or part line is not counted hit the button result = 15 but there are 17 on display Not sure I'd call that a bug. Perhaps we need a second accessor to give you the other value?
|
|