Print Page | Close Window

xtpControlCustom - SetFocus Problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=11950
Printed Date: 24 November 2024 at 11:15am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: xtpControlCustom - SetFocus Problem
Posted By: Josef
Subject: xtpControlCustom - SetFocus Problem
Date 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:
uploads/20080824_180921_SetFocusProblem.zip - 20080824_180921_SetFocusProblem.zip

Thank you,
Josef



-------------
Product: Xtreme SuitePro ActiveX v13.2.1
Platform: Windows 2008 (64bit)
Language: Visual Basic 6.0



Replies:
Posted By: ijwelch
Date Posted: 24 August 2008 at 10:45pm
Try adding FlatEdit to PictureBox first, then add PictureBox to CommandBar.


Posted By: Josef
Date 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


Posted By: Aaron
Date 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....


Posted By: Baldur
Date 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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net