RE: Highlighting edittext boxes
- Posted by Don Phillips <Graebel at hotmail.com> Sep 05, 2002
- 434 views
> I have a program with lots of little text boxes on screen. > I can tab from one to another with - guess - the Tab key. > The selected box just shows a dotted rectangle around it, > but I need it to go inverse-video or otherwise highlight > decently so it can be seen easily. I can't find how to do > this among the myriads of Windows messages of various types. > Can anyone advise me? I can do it for a ListView box with advice > from someone here but I forget whom. And it doesn't want to work > with simple edit text boxes. So ... > Andy Drummond Ello Andy, heres a simple short example for ya. ========== include Win32Lib.ew without warning constant MainWin = create( Window, "Testing", NULL, 0.25, 0.25, 0.5, 0.5, 0 ), Edit1 = create( EditText, "text1", MainWin, 10, 10, 150, 20, 0 ), Edit2 = create( EditText, "text2", MainWin, 10, 40, 150, 20, 0 ), Edit3 = create( EditText, "text3", MainWin, 10, 70, 150, 20, 0 ) procedure InverseVideo() atom Void Void = sendMessage( getSelf(), EM_SETSEL, 0, -1 ) end procedure onGotFocus[ Edit1 ] = routine_id( "InverseVideo" ) onGotFocus[ Edit2 ] = routine_id( "InverseVideo" ) onGotFocus[ Edit3 ] = routine_id( "InverseVideo" ) WinMain( MainWin, Normal ) ==========