Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 24th, 2005, 3:48 PM   #1
Automatik
Newbie
 
Join Date: May 2005
Posts: 16
Rep Power: 0 Automatik is on a distinguished road
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.
Automatik is offline   Reply With Quote
Old Jun 12th, 2005, 3:27 AM   #2
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
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
kurifu is offline   Reply With Quote
Old Jun 12th, 2005, 4:18 AM   #3
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,223
Rep Power: 5 grumpy is on a distinguished road
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.
grumpy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:49 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC