PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Nathan Durland on January 26, 2010, 06:27:08 PM

Title: Text Box is a like a roach motel?
Post by: Nathan Durland on January 26, 2010, 06:27:08 PM
I have a project where the user will be entering notes into a text box.  I created a standard TextBox control, and set the es_multiline and es_wantreturn properties, and cleared es_autohscroll.

I can tab into the field just fine, but the TAB key won't get me out.  I have to mouse click the next field.  If I clear the es_multiline property, I can TAB away.  Is that how it's supposed to behave?
Title: Re: Text Box is a like a roach motel?
Post by: Ivan Iraola on January 26, 2010, 07:41:04 PM
I have the same problem.
Title: Re: Text Box is a like a roach motel?
Post by: Paul Squires on January 26, 2010, 08:09:03 PM
This is the behaviour that I have always witnessed with winapi created textboxes. I think that DDT handles the Tab like you need it to.

I will take a look at seeing if I can build in a way to intercept the Tab and manually move the focus within the tab stop sequence.
Title: Re: Text Box is a like a roach motel?
Post by: Paul Squires on January 26, 2010, 08:43:01 PM
Okay, this is now fixed. Pressing the TAB while in a multiline textbox will take you to the next control in the tab sequence. Pressing Shift+Tab will take you to the previous. I am now testing for the TAB key in the message pump and if the focus is on a multiline textbox then the focus is set and %WM_NULL message passed through the pump.

The fix will be in v3.07.
Title: Re: Text Box is a like a roach motel?
Post by: Roger Garstang on January 27, 2010, 12:15:08 AM
Cool, I always thought multiline textboxes eating tab chars but not using them was dumb, now they will work how intended.
Title: Re: Text Box is a like a roach motel?
Post by: Martin Francom on January 27, 2010, 12:41:08 AM
Paul,  Will that also be the new behavior in  RichEdit Control  and in FireTextBox?
Title: Re: Text Box is a like a roach motel?
Post by: Rolf Brandt on January 27, 2010, 07:00:51 AM
Reminds me of that old commercial of the 60's:
Roaches check in, but they never check out!
Title: Re: Text Box is a like a roach motel?
Post by: Paul Squires on January 27, 2010, 08:17:08 AM
Quote from: Marty Francom on January 27, 2010, 12:41:08 AM
Paul,  Will that also be the new behavior in  RichEdit Control  and in FireTextBox?
I had forgotten about the RichEdit control. I made that change as well.
Title: Re: Text Box is a like a roach motel?
Post by: Nathan Durland on January 27, 2010, 10:58:40 AM
Quote from: TechSupport on January 26, 2010, 08:43:01 PM
Okay, this is now fixed. Pressing the TAB while in a multiline textbox will take you to the next control in the tab sequence. Pressing Shift+Tab will take you to the previous.


Very cool.. Thx much.
Title: Re: Text Box is a like a roach motel?
Post by: Roger Garstang on January 27, 2010, 06:50:51 PM
Weird, I would have thought RichEdit would have used Tabs...I never use them that much though. I did see one thing while testing- Ctrl+Tab inserts Tab for both, so we should be good.
Title: Re: Text Box is a like a roach motel?
Post by: Roger Garstang on January 27, 2010, 06:54:24 PM
Quote from: Rolf Brandt on January 27, 2010, 07:00:51 AM
Reminds me of that old commercial of the 60's:
Roaches check in, but they never check out!

Wasn't born in the 60's and I remembered the line. http://en.wikipedia.org/wiki/Roach_Motel_%28insect_trap%29

The little black Combat traps are awesome.  They take the bait back to their buddies and you never see roaches again.
Title: Re: Text Box is a like a roach motel?
Post by: Rolf Brandt on January 27, 2010, 07:01:58 PM
I visited the states the first time in '69. There was virtually  no subway car without a couple of really cute Roach Motel advertisements.
Title: Re: Text Box is a like a roach motel?
Post by: Roger Garstang on January 27, 2010, 07:35:37 PM
Was it another company?  Everywhere I search says Black Flag started producing them in May of '76 and obtained Trademark in Feb '77. Looks like before then it was just DCON Roach Traps and Muhammad advertised for both, but I couldn't find any youtube clips for DCON other than him just punching out towards the screen a lot and saying DCON Power. Black Flag calling them Motels stole the market. And, they coined the phrase.  They even tried sueing others calling them Roach Inns, etc. '69 must have been a bad year for roaches or something if they advertised that strong.  Would be interesting if where you visited was a small area and had someone else calling them that first, but didn't have enough money to promote at the time and Black Flag stole the idea years later to get market from DCON.  Sounds like a Bill Gates deal to me.
Title: Re: Text Box is a like a roach motel?
Post by: Rolf Brandt on January 27, 2010, 08:01:09 PM
Strange - I also can find no reference to it before 76
http://books.google.de/books?id=AOECAAAAMBAJ&pg=PA71&lpg=PA71&dq=roaches+check+in+but+they+never+check+out&source=bl&ots=B-YUMldC89&sig=WpdA6h7ab0obGDvFcLe1VKDZytk&hl=de&ei=4sdgS52REMLr-Qbq45THDA&sa=X&oi=book_result&ct=result&resnum=3&ved=0CBIQ6AEwAg#v=onepage&q=&f=false

Mayby Prof. Alzheimer is knocking on my door. Though I was always proud I still remembered his first name!