Print Page | Close Window

Text selstart

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=10642
Printed Date: 16 November 2024 at 11:45am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Text selstart
Posted By: JvdH
Subject: Text selstart
Date Posted: 15 May 2008 at 2:08pm
Hi,
 
Im using VB6.
 
When using the original textboxes i use this command:
 
Text1.SelStart = Len(Text1.Text)`
 
to keep the textbox scrolling automatically when entering text automatically to the textbox.
 
I see this isnt possible with the suite controls textbox or is it?
 
Thank you



Replies:
Posted By: JantjeKeizer
Date Posted: 15 May 2008 at 3:31pm
I experienced the same problem. The selstart works, but doesn't set focus to the cursor. So sometimes it's 'outside' of the window


Posted By: Oleg
Date Posted: 16 May 2008 at 1:24am
hI,
 
Sorry, I don't se difference:
 
Private Sub Command2_Click()
FlatEdit1.Text = "wefjowe iprwoieroip wepwpeoirpiowe rpwe pro"
FlatEdit1.SelStart = Len(FlatEdit1.Text)
FlatEdit1.SetFocus
End Sub
it set text and scroll to end.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: JantjeKeizer
Date Posted: 16 May 2008 at 3:34am
uploads/20080516_033441_textscroll.rar - 20080516_033441_textscroll.rar
See this example


Posted By: Oleg
Date Posted: 16 May 2008 at 1:02pm
Hello,
 
Thanks. see now. Changed.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: JvdH
Date Posted: 16 May 2008 at 2:48pm
Originally posted by oleg oleg wrote:

hI,
 
Sorry, I don't se difference:
 
Private Sub Command2_Click()
FlatEdit1.Text = "wefjowe iprwoieroip wepwpeoirpiowe rpwe pro"
FlatEdit1.SelStart = Len(FlatEdit1.Text)
FlatEdit1.SetFocus
End Sub
it set text and scroll to end.
 
is it possible without setfocus cuz i dont want the flatbox focussed?
Btw this example still aint working. (im using 11.2 btw)


Posted By: Oleg
Date Posted: 16 May 2008 at 2:51pm
Hi,
Yes, it will work without SetFocus too.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: JvdH
Date Posted: 16 May 2008 at 3:23pm
Originally posted by oleg oleg wrote:

Hi,
Yes, it will work without SetFocus too.
It was more like a question of how :P cuz it wont work or is that because im using 11 instead of 12?
 
Its a multilined flatbox btw


Posted By: Oleg
Date Posted: 17 May 2008 at 1:31am
Hi,
 
As workaround for 11 you can just send message
 
SendMessage(edit.hWnd, EM_SCROLLCARET, 0, 0);
 
 
where EM_SCROLLCARET = 0x00B7



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net