![]() |
Setting focus for a button in a command bar |
Post Reply
|
| Author | |
big_red_frog
Newbie
Joined: 18 November 2007 Location: Canada Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Topic: Setting focus for a button in a command barPosted: 25 November 2007 at 7:20pm |
|
Any one have an example of how to set the focus to a particular button in the command bar on creation.
I am not a native windows programmer, so it is probably obvious, but ...
So this allows me to get the reference for the control I want
CXTPControl *temp = m_wndToolBar.GetControls()->FindControl(xtpControlButton, IDOK, TRUE, FALSE);
Looking at temp, I could see it was the correct control.
But this doesn't set the focus...
m_wndToolBar.GetControls()->FindControl(xtpControlButton, IDOK, TRUE, FALSE)->SetFocused( TRUE );;
Thanks.
Otherwise things are going really nice and smooth!
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 November 2007 at 1:01am |
|
Hi,
m_wndToolBar.SetTrackingMode(TRUE, FALSE);
m_wndToolBar.SetSelected(m_nIndex, TRUE); |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |