![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: May 2005
Posts: 16
Rep Power: 0
![]() |
Borland C++ Move Focus
Lets say I click a button, how would I then programatically shift the focus to a StringGrid Cell or to anything for that matter.
|
|
|
|
|
|
#2 |
|
Expert Programmer
|
Control::Focus is the property you are looking for, or maybe it is a method, I do not remember... oh this is assuming that you are using VCL.
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
|
|
#3 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,223
Rep Power: 5
![]() |
If he's using Borland Builder, he's almost certainly using the VCL. If he's using Borland C++, he may or may not be using the VCL.
First the VCL way: TWinControl, is the base class from which all windowing controls are derived. In rough terms, the definition of a windowing control is one that has three core attributes (it can receive focus, it can contain other controls, and it has a window handle). TWinControl has a method called SetFocus(), which takes no arguments, and makes the control grab focus. The win32 SDK way requires a handle for the control. Use SendMessage() to send a WM_SETFOCUS message to the control. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|