Tabstops in TextBox

Started by Mark Strickland, July 14, 2005, 11:37:06 AM

Previous topic - Next topic

Mark Strickland

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

Edwin Knoppert2

It must be VarPtr( tabstop(0) )
Also, it didn't work with my single line edit box.
Only on multilined.

Charles Dietz

Edwin is exactly right... that's what I found with a small DDT example.