Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - xtpControlCustom - SetFocus Problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

xtpControlCustom - SetFocus Problem

 Post Reply Post Reply
Author
Message
Josef View Drop Down
Groupie
Groupie


Joined: 15 April 2006
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote Josef Quote  Post ReplyReply Direct Link To This Post Topic: xtpControlCustom - SetFocus Problem
    Posted: 24 August 2008 at 6:12pm
Hello,

I have a strange Problem using a FlatEdit-Control as a custom Commandbar control.
When the Flatedit control receives the focus, it moves to it's original position on the form.

Please take a look at the attached sample project:
20080824_180921_SetFocusProblem.zip

Thank you,
Josef

Product: Xtreme SuitePro ActiveX v13.2.1
Platform: Windows 2008 (64bit)
Language: Visual Basic 6.0
Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2008 at 10:45pm
Try adding FlatEdit to PictureBox first, then add PictureBox to CommandBar.
Back to Top
Josef View Drop Down
Groupie
Groupie


Joined: 15 April 2006
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote Josef Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2008 at 2:42pm
Hi,

this works, but shouldn't it work without Picturebox too?

Thank you,
Josef
Product: Xtreme SuitePro ActiveX v13.2.1
Platform: Windows 2008 (64bit)
Language: Visual Basic 6.0
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2008 at 2:58am
Hi,
 
Most controls get detached and no one has an answer for this problem so I use ALWAYS a picturebox. I don't even try anymore... I suggest you do the same  
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Baldur View Drop Down
Senior Member
Senior Member


Joined: 22 November 2006
Location: Germany
Status: Offline
Points: 244
Post Options Post Options   Thanks (0) Thanks(0)   Quote Baldur Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2008 at 3:55am
The problem is, that CommandBars are not really a Container-Control !
You assign only a windows-handle.
But if a control is contained it use the Extender-Property of the Container to get some informationes like position, backgrounds and other.
If you put the control in the form, the container is the form and the positions are relative to the form.
If you put a control in a picturebox, the positions are relative to the picturebox (see Left/Top-Properties).
The picturebox itself don't use the extender because its a container himself.
 
In .NET you must use a panel-control, picturebox is there not a container-control.
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.156 seconds.