![]() |
Behavior of CommandBarEdit.SetFocus() |
Post Reply ![]() |
Author | |
apuhjee ![]() Senior Member ![]() ![]() Joined: 02 September 2005 Location: United States Status: Offline Points: 130 |
![]() ![]() ![]() ![]() ![]() Posted: 07 May 2006 at 2:58pm |
I'm not quite sure the behavior I'm getting from the SetFocus() method of a CommandBarEdit control is exactly what should be happening.
The first thing our application does after launching is require a user to sign in. Following good UI practices - since we know that the Username field will need focus, it would be nice for us to do that automatically (think My Yahoo! sign in... 1) launch page 2) type away) The problem: ![]() It seems that the control is getting focus, but there is no visible caret and typing has no effect. Hitting the tab key once brings us to the desired state, but should that be necessary? Issue #2 (this is more like a question...) Is there any control over what toolbar items are shown when the window is not wide enough to show all of them? You can see in the following screenshot that the 'Password' field has been dropped. Since this field is absolutely necessary, it would be nice if I could give it higher priority than the simple tool shortcuts in the toolbar to the left. ![]() See what I mean? If anyone could advise on either of these issues, it would be greatly appreciated. Regards ~ jp |
|
I like mathematics because it is not human and has nothing particular
to do with this planet or with the whole accidental universe — because, like Spinoza's God, it won't love us in return. |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello, Try Execute for EditControl: CommandBars(3).Controls(2).Execute 2. You can only prevent Wraping at all: CommandBars(3).EnableDocking xtpFlagAlignAny Or xtpFlagFloating |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
apuhjee ![]() Senior Member ![]() ![]() Joined: 02 September 2005 Location: United States Status: Offline Points: 130 |
![]() ![]() ![]() ![]() ![]() |
Thanks Oleg -
Both solutions work nicely. You are like the Gary Kasparov of programming ![]() The CommandBarKeyDown Event... reference docs don't mention what the behavior of that is for CommanBarEdit / CommandBarComboBox, but it appears to be fired for at least Tab (keyCode = 9) or Enter (keyCode = 13). Why doesn't this work for the alphanumeric keyCodes? I'd like to prevent the user from using certain keys (i.e. spacebar in password). Is this possible? Regards ~ jp |
|
I like mathematics because it is not human and has nothing particular
to do with this planet or with the whole accidental universe — because, like Spinoza's God, it won't love us in return. |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi, It will be possible with next release. |
|
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 |