PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Mark Strickland on July 14, 2005, 11:37:06 AM

Title: Tabstops in TextBox
Post by: Mark Strickland on July 14, 2005, 11:37:06 AM
I am trying to use TabStops in a single line TextBox.  I found this little bit of code that works in VB but it seems to do nothing in FF.

Any thoughts?


DIM tabstop (0 TO 2) AS LONG
DIM txt AS STRING
DIM stat AS LONG

   tabstop(0) = 90
   tabstop(1) = 130
   tabstop(2) = 185
 
  'set the tabs
   stat = SENDMESSAGE(HWND_FORM1_TEXT1, %EM_SETTABSTOPS, 3, tabstop(0))

   MSGBOX STR$(stat), %mb_ok+%mb_taskmodal, "SENDMESSAGE result"

   txt = "col1" + CHR$(9) + "col2" + CHR$(9) + "col3"
   FF_TEXTBOX_SETTEXT (HWND_FORM1_TEXT1, txt)



I even added a FF_REDRAW before and after just as a guess but that did not help.

The chr$(9)'s show as a block (un-printable character) but don't tab to the next column.


Thanks
Title: Tabstops in TextBox
Post by: Edwin Knoppert2 on July 14, 2005, 01:41:26 PM
It must be VarPtr( tabstop(0) )
Also, it didn't work with my single line edit box.
Only on multilined.
Title: Tabstops in TextBox
Post by: Charles Dietz on July 14, 2005, 02:03:50 PM
Edwin is exactly right... that's what I found with a small DDT example.