Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keep Highlight after lostfocus
Message
From
24/11/1998 01:01:43
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00160759
Message ID:
00160780
Views:
28
>I'm using an incremental search combobox that seeks to the current closest match as you type. It also has a grid on the same form that goes to the corresponding record in the grid as the user types, and highlights that record so the user can look at the grid to see if it is the record they are looking for. Like, real time search. But, I lose the highlight because after each keystroke in the combo I have to set the focus to the grid then back to the combo for the next keypress. Then I lose the highlight in the grid. Anyway to keep the DynamicBackColor after grid loses focus?
>
>Eric K.
With a proper dynamicbackcolor setting all you need is to refresh the grid. ie: This is from "highlighted" grid class in files\classes section :
* Grid.init
WITH this
 IF !empty(.RecordSource)
  .nCurRec = recno(this.RecordSource)
  .SetAll("DynamicBackColor", "IIF(RecNo(This.RecordSource) = This.nCurRec," + ;
    str(this.cCurRecBackColor)+","+str(this.BackColor)+")", "Column")
  .SetAll("DynamicForeColor", "IIF(RecNo(This.RecordSource) = This.nCurRec," + ;
    str(this.cCurRecForeColor)+","+str(this.ForeColor)+")", "Column")
 ENDIF
ENDWITH
* Grid custom method recchange
This.nCurRec = recno()
This.refresh
From outside of grid as pointer moves you just call grid.recchange().
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform