Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grid Behavior 1

Status
Not open for further replies.

Scott24x7

Programmer
Jul 12, 2001
2,814
JP
Hi all,
I noticed recently that "modern" applications will generally allow scrolling text when the text is larger than fits the control, simply when the mouse is hovering over that control. And I realized, in one of my own applications that this "intuitive" behavior wasn't there. I have a grid that contains the values for companies. But if I click in another grid I have on a contact, and then "hover" back over the companies grid, the mouse wheel still thinks I'm in the contact grid.
I then thought, ok, I'll just use the MouseEnter() event to do something like "This.GotFocus()", but it turns out GRID control doesn't have a GotFocus method... Which lead me to realize, than when I initially click the grid control, it doesn't select the row I'm hovering over, that acts a a "Click" event AFTER the grid is clicked on again, so I don't get how the "Focus" is getting set on a Grid without a GotFocus() event?

So what I would like achieve is the ability to just hover over the control and allow me to scroll the control without having to click on it first.
Does this make sense? Is there any way to mimic this behavior with VFP 9?


Best Regards,
Scott
ATS, CDCE, CTIA, CTDC

"Everything should be made as simple as possible, and no simpler."[hammer]
 
Olaf,
I see your point, and I do appreciate your view of it. As for a way to get the behavior from VFP without a VFP code would be interesting. But I have reservations that would happen. It's funny though the one thing you describe about mouse moving and entering text is kind of the opposite of the problem I have. I find more often (not VFP related at all), that I'll have my mouse over some window, and scrolling about, and thing I'm IN that window as <some kind of set focus> but I'm actually still back in the application. So I start to type and then realize, it's controlling a different app. But as I mention, that's not a VFP thing, that's a UI behavior. In any case, thanks for helping to think this through.

Best Regards,
Scott
ATS, CDCE, CTIA, CTDC

"Everything should be made as simple as possible, and no simpler."[hammer]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top