#212950 - 2017-11-24 01:54 PM
TextBox[HELP]
|
AndreLuiz
Getting the hang of it
Registered: 2015-10-07
Posts: 89
Loc: Brasil, João pessoa
|
[PtBr] Olá a todos, eu gostaria de saber como faço para saber onde o cursor de digitação está dentro do texto como um todo.
[Eng] Hello everyone, I would like to know how do I know where the typing cursor is inside the text as a whole.
break on
$sys = createObject('kixtart.system')
$frm = $sys.form()
$frm.size = 450, 400
$tx = $frm.textbox
$tx.dock = 5
$tx.text = 'ola1'+@crlf+'ola2'+@crlf+'ola3'+@crlf
$frm.show
while $frm.visible
$=Execute($frm.doevents(1))
sleep 0.05
$ln = ubound(Split($tx.text, @crlf))+1
$lns = ubound(Split(substr($tx.text, 1, $tx.SelectionStart+1), @crlf))+1
$tx.SelectionStart-1?
Len($tx.text)-$ln?
$ln?
$frm.text =
"Length:"+Cstr(Len($tx.text))+
" | Lines:"+cstr($ln)+
" | Pos:"+Cstr($tx.SelectionStart+1)+
" | Line pos:"+cstr($lns)
$lns = 0
$text = ''
loop
|
Top
|
|
|
|
#213002 - 2017-11-27 02:03 PM
Re: TextBox[HELP]
[Re: Jochen]
|
Arend_
MM club member
   
Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
|
Works for me.
break on
$sys = createObject('kixtart.system')
$frm = $sys.form()
$frm.size = 450, 400
$tx = $frm.textbox
$tx.dock = 5
$tx.multiline = 1
$tx.text = 'ola1'+@crlf+'ola2'+@crlf+'ola3'+@crlf
$frm.show
while $frm.visible
$=Execute($frm.doevents(1))
sleep 0.05
$ln = ubound(Split($tx.text, @crlf))+1
$lns = ubound(Split(substr($tx.text, 1, $tx.SelectionStart+1), @crlf))+1
$tx.SelectionStart-1?
Len($tx.text)-$ln?
$ln?
$frm.text =
"Length:"+Cstr(Len($tx.text))+
" | Lines:"+cstr($ln)+
" | Pos:"+Cstr($tx.SelectionStart+1)+
" | Line pos:"+cstr($lns)
$lns = 0
$text = ''
loop
|
Top
|
|
|
|
#213006 - 2017-11-27 03:53 PM
Re: TextBox[HELP]
[Re: Arend_]
|
Arend_
MM club member
   
Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
|
|
Top
|
|
|
|
#213008 - 2017-11-27 04:25 PM
Re: TextBox[HELP]
[Re: Arend_]
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4557
Loc: USA
|
Mulit line.... HA! Business in the front and party in the back.
|
Top
|
|
|
|
#213013 - 2017-11-27 07:20 PM
Re: TextBox[HELP]
[Re: Arend_]
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
|
Top
|
|
|
|
#213025 - 2017-11-29 05:02 AM
Re: TextBox[HELP]
[Re: Jochen]
|
AndreLuiz
Getting the hang of it
Registered: 2015-10-07
Posts: 89
Loc: Brasil, João pessoa
|
[PtBr] Muito obrigado pela ajuda!!! hahahh, funcionou no textbox, mas no richtextbox não funciona, veja.
[Eng] Thanks a lot for the help!!! hahahh, it ran in the textbox, but the richtextbox does not work, see.
break on
$sys = createObject('kixtart.system')
$frm = $sys.form()
$frm.size = 450, 400
$tx = $frm.Richtextbox
$tx.dock = 5
$tx.multiline = 1
$tx.text = 'ola1'+@crlf+'ola2'+@crlf+'ola3'+@crlf
$frm.show
while $frm.visible
$=Execute($frm.doevents(1))
sleep 0.05
$ln = ubound(Split($tx.text, @crlf))+1
$lns = ubound(Split(substr($tx.text, 1, $tx.SelectionStart+1), @crlf))+1
$tx.SelectionStart-1?
Len($tx.text)-$ln?
$ln?
$frm.text =
"Length:"+Cstr(Len($tx.text))+
" | Lines:"+cstr($ln)+
" | Pos:"+Cstr($tx.SelectionStart+1)+
" | Line pos:"+cstr($lns)
$lns = 0
$text = ''
loop
|
Top
|
|
|
|
#213075 - 2017-12-15 01:33 PM
Re: TextBox[HELP]
[Re: Arend_]
|
AndreLuiz
Getting the hang of it
Registered: 2015-10-07
Posts: 89
Loc: Brasil, João pessoa
|
[Eng(Translate)] Hello, pardon me for the delay. The error is displayed automatically by an image, notice a column where it is and tell what it should actually have there.
[PtBr] Olá perdoe-me pela demora. O erro estará autoexplicativo ao ver a imagem, repare a coluna onde está e conte o que deveria ter ali de fato.

[Eng(Translate)] I hope they get an algorithm that works with richtextbox, it would be very useful for me, thank you in advance!! 
[PtBr] Espero que consigam um algorítimo que funcione com ritchtextbox, seria muito útil para mim, obrigado desde já!!
|
Top
|
|
|
|
Moderator: ShaneEP, Mart, Radimus, Jochen, Allen, Glenn Barnas
|
2023-12-29 [BradV]
Happy new year!
2024-02-09 [RSLHA]
No access possible!
2024-02-09 [RSLHA]
Database Error!
2024-02-18 [Dr_Rick]
What happened to Bruno
2024-03-08 [mole]
Thanks for getting the posts back again.
2024-04-18 [MarineV]
will the db errors get fixed????
2024-04-26 [Tonny]
database error, please!
2024-05-09 [NTDOC]
I'm not seeing any errors
2024-05-31 [chojin]
DB is down again
2024-06-04 [selsner]
Still no access, please help!
2024-06-07 [mole]
Looks like DB is back again. Thanks.
2024-06-17 [It_took_my_meds]
We encountered a problem. The reason reported was Database error only visible to forum administrators Please click back to return to the previous page.
2024-07-04 [Armin73]
There is still a database error 🤷♂️
2024-07-09 [0neZero]
There is still a database error 🤷♂️
2024-07-10 [Allen]
DB working a few times in between the messages above. Working again as of 7/10. Thanks Doc
2024-08-31 [NetGnostic]
Bummer, the Database error is back.
2024-09-04 [NTDOC]
Fourms are back up without error for the moment
2024-10-02 [Arend_]
Wll still have database errors ;-)
2024-10-03 [Allen]
Thanks to Doc... it's back.
2024-12-09 [chojin]
could we move kixtart to a new place in order to keep it living ? maybe create a github page and a subreddit?
2024-12-10 [Allen]
do know about moving it, but I know Doc is aware of the DB issue. Should be back online soon.
2024-12-10 [Allen]
don't know...
2025-02-09 [Comet]
Greetings. I installed KiX on my new Windows 11 computer, and joined this foum. Hello World!
2025-02-10 [Allen]
Welcome
2025-03-07 [Comet]
UBB Error We encountered a problem. The reason reported was Database error only visible to forum administrators
2025-06-30 [mole]
Thanks for getting this working again.
2025-07-28 [mole]
UBB Error We encountered a problem. The reason reported was Database error only visible to forum administrators
2025-08-01 [Arend_]
I think it's fixed, I don't have the problem.
|
|
0 registered
and 581 anonymous users online.
|
|
|