Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - PushButton.BuddyControl & Resize
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

PushButton.BuddyControl & Resize

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

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post Topic: PushButton.BuddyControl & Resize
    Posted: 19 October 2010 at 10:16am
I like to have a FlatEdit with a PushButton as buddycontrol right-justified on a form.
But it doesn't work with resize.

Put a FlatEdit and a PushButton on a Form. Use this code:

Private Sub Form_Load()
PushButton1.BuddyControl = FlatEdit1
End Sub

Private Sub Form_Resize()
On Error Resume Next
FlatEdit1.Width = Me.ScaleWidth - 2300
PushButton1.BuddyControl = FlatEdit1
End Sub


If you run the application and resize the form you will notice that the button is at the correct position.
But as soon as you change the text in the FlatEdit and resize again, the PushButton buddy thing doesn't work anymore.  Cry
Product: Xtreme SuitePro (ActiveX) Version 15.0.2
Platform: Windows XP (32bit) German - SP 2
Language: VB6 / C# 4.0
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 October 2010 at 5:06pm
Confirmed in 13.4.0 for me too - can anyone try this in 13.4.2 to see if it is still a problem?


Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 11 December 2010 at 4:00pm
Still a problem in latest beta.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

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: 13 December 2010 at 1:44pm
Hi,

BuddyControl is string property. you need set it as

PushButton1.BuddyControl = "FlatEdit1"
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 13 December 2010 at 2:57pm
Ah! Thanks Oleg, our mistake Embarrassed
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post Posted: 14 December 2010 at 3:09am
What is the default property of a FlatEdit? If it's the name it should work as you tried.
Product: Xtreme SuitePro (ActiveX) version 15.3.1

Platform: Windows XP (32bit) - SP 3 (on VMWare)

Language: Visual Basic 6.0



Back to Top
Jean View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post Posted: 15 December 2010 at 11:01am
Thank you.
Didn't notice the little mistake.  Embarrassed
Product: Xtreme SuitePro (ActiveX) Version 15.0.2
Platform: Windows XP (32bit) German - SP 2
Language: VB6 / C# 4.0
Back to Top
Jean View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2011 at 4:36am
I still have a problem with the buddy control property:
What I like to have is a resizable UserControl with a FlatEdit+PushButton inside.
Try this:
1) Put a FlatEdit on a UserControl
2) Put a PushButton on the same UserControl
3) Use this code:

Private Sub UserControl_Initialize()
PushButton1.BuddyControl = "FlatEdit1"
End Sub

Private Sub UserControl_Resize()
On Error Resume Next
FlatEdit1.Move 0, 0, UserControl.ScaleWidth - PushButton1.Width, UserControl.ScaleHeight
PushButton1.BuddyControl = "FlatEdit1"
End Sub

4) Compile the Ocx.
5) Use the compiled control: Create a new standard exe project. Put the new Control on the form. Save the project, close the project: Error message!  Cry
Product: Xtreme SuitePro (ActiveX) Version 15.0.2
Platform: Windows XP (32bit) German - SP 2
Language: VB6 / C# 4.0
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.172 seconds.