Find/Replace of tabs

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Find/Replace of tabs

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:35 pm

by John Porter >> Tue, 14 Aug 2001 6:52:42 GMT

Just in case there are some who don't realise this, you can Find/Replace on text including tabs. For example, you can replace all occurances of four spaces with a tab. To enter a tab in either textbox box, use Ctrl+Tab. In case this isn't intentional behaviour and it goes away in a future release, you can also locate an existing tab and copy/paste it into the textboxes.

Cheers,
John P

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Find/Replace of tabs

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:35 pm

by Craig Shearer >> Tue, 14 Aug 2001 20:04:11 GMT

Hi John

This is very interesting, because it raises another point I hadn't considered.

Your demonstration shows that it's indeed possible to type a Tab character in any textbox using ctrl-Tab. (Except in MDI applications where ctrl-Tab switches between windows). Also, the user can also cut and paste text into a field; that text might contain Tab characters.

Anyway, the problem with this, at least for some of my applications, is when we use a Tab character to separate cells when loading a Table control. Now, if I load a Table control with text containing tabs, the text gets pushed across into the next column!!!

So, I guess the solution is not to use Tab separators to load rows in a Table control, and load each cell individually (I think this is slower), or perhaps to "cleanse" the user's input and strip out any Tab characters they've entered.

Has anybody else encountered this? What was your solution?

Craig.


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 10 guests