Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Behavior of CommandBarEdit.SetFocus()
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Behavior of CommandBarEdit.SetFocus()

 Post Reply Post Reply
Author
Message
apuhjee View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 September 2005
Location: United States
Status: Offline
Points: 130
Post Options Post Options   Thanks (0) Thanks(0)   Quote apuhjee Quote  Post ReplyReply Direct Link To This Post Topic: Behavior of CommandBarEdit.SetFocus()
    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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2006 at 6:51pm

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
Back to Top
apuhjee View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 September 2005
Location: United States
Status: Offline
Points: 130
Post Options Post Options   Thanks (0) Thanks(0)   Quote apuhjee Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2006 at 7:32pm
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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 08 May 2006 at 8:42am

Hi,

It will be possible with next release.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.033 seconds.