PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Billy Reaves on July 24, 2006, 03:06:19 PM

Title: Tabs using tab key in textbox or richedit?
Post by: Billy Reaves on July 24, 2006, 03:06:19 PM
i have create a small text window for the end user to type into.

and i need the tab key to work as a tab key in the textbox or richedit.

also if possible i need to be able to set the tab stop to 5 spaces.

is this possible ?

Thanks
Title: Tabs using tab key in textbox or richedit?
Post by: TechSupport on July 24, 2006, 06:32:22 PM
When using single line TextBoxes, pressing the TAB key will move focus to the next control in the %WS_TABSTOP chain. You will need to create the textbox as a multiline control and press Ctrl+Tab in order to insert tab stops in your textbox.

In order to set the tab stop distance, use code like the following:

Local nDistance As Long

nDistance = 10
SendMessage HWND_FORM1_TEXT1, %EM_SETTABSTOPS, 1, VarPtr(nDistance)
Title: Tabs using tab key in textbox or richedit?
Post by: Billy Reaves on July 24, 2006, 11:29:26 PM
Paul thanks for the quick reply.

this is the first time that i needed to use the tab key in a multi line textbox
and i was unable to find the answer i was looking for.

Thanks.

Can't wait to see version 3.
Title: Tabs using tab key in textbox or richedit?
Post by: Elias Montoya on August 04, 2006, 12:24:58 AM
test, ignore. :)