does anyone know how many spaces a vbtab can take up? is there a way to find out?
Printable View
does anyone know how many spaces a vbtab can take up? is there a way to find out?
I'm not aware of any function that returns that...
If it's that important vbTab can easily be substituted with fixed number of spaces using Space(number_of_spaces) function when you build string yourself.
If string comes from elsewhere you may use Replace(oldstring, vbTab, Space(number_of_spaces)) function to replace all vbTab characters with fixed number of spaces.
btw, there is no need to post twice the same question. ;)
To piggyback on RhinoBull's comments. Tabs are not necessarily the same from control to control or on the printer. A tab in a listbox may not be the same tab in a textbox and may not be same as a tab in a picturebox, etc, etc. Tabs are almost always related to font type/size; though some may be hard-set pixel offsets.
In addition, many controls allow users to explicitly set tabs to custom offsets so a tab in the same types of controls may not match. I wouldn't make the blanket assumption that a tab is always a fixed amount of "spaces" every time a tab character is encountered; tabs can be fixed or dynamically spaced