Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Can't set some properties in a user control
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Can't set some properties in a user control

 Post Reply Post Reply
Author
Message
RedFin View Drop Down
Groupie
Groupie
Avatar

Joined: 26 March 2008
Location: Australia
Status: Offline
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote RedFin Quote  Post ReplyReply Direct Link To This Post Topic: Can't set some properties in a user control
    Posted: 29 March 2008 at 11:33pm
Hi,

I have created an ActiveX control for my application. This ActiveX control has a CodeJock ComboBox and FlatEdit control on it. I cannot change some of the properties of the ComboBox or FlatEdit controls.

For example, my ActiveX control has the following property -

Public Property Let ComboStyle(lComboStyle As ComboBoxStyle)
    mlComboStyle = lComboStyle
    Combo1.Style = mlComboStyle
    PropertyChanged "ComboStyle"
End Property

When I change the "ComboStyle" property in both design time or runtime, the ActiveX Control's property changes, but the Combo style does not. If I put a break point on the "PropertyChanged" line, and then inspect the values of "Combo1.Style" and "mlComboStyle" I see that "Combo1.Style" is fixed on 2 (the default) and mlComboStyle is 0 (what I am trying to change it to).

I am having the same problem when changing the FlatEdit controls "MultiLine" property, using the same process.

Does anyone have any ideas what I am doing wrong?


Many thanks,

Rohan
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: 30 March 2008 at 4:19am
Hi,
 
Maybe they are ReadOnly properties and you cannot assign a value to it during runtime. Maybe CJ controls don't raise an error if you try to do this. If you try this with a MS control you will get an error: "Can't assign to a readonly property".
 
This has nothing to do with, in your case, an activeX. Try to assign a value to the same property in a form and you will have the same problem.
Back to Top
RedFin View Drop Down
Groupie
Groupie
Avatar

Joined: 26 March 2008
Location: Australia
Status: Offline
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote RedFin Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2008 at 5:00am
Hi Aaron,

Good call, you are exactly right. If I place a combo box on a form and try to change its style property during runtime, I can't.

So, this must mean that even in the IDE (VB6 by the way) for my application, the ActiveX control itself is in runtime and therefore my code above doesn't work. Does anyone have any suggestions as to what I can do to get this to work?


Thanks,

Rohan
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: 31 March 2008 at 12:40am
Rohan,
 
I think it's not possible to do this. Maybe the API gods will have mercy with you  ( I doubt that, I fell on my knees several times but no reponce on the other side)
 
But why do you want to change the style during runtime?
Back to Top
RedFin View Drop Down
Groupie
Groupie
Avatar

Joined: 26 March 2008
Location: Australia
Status: Offline
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote RedFin Quote  Post ReplyReply Direct Link To This Post Posted: 31 March 2008 at 1:54am
Thanks Aaron.

I don't want to change the style during the runtime of the app....what appears to be happening is that during design time of the application, the ActiveX component is actually in "runtime" and therefore, I can't change the style property that way - there are instances where I want the ActiveX control to display the constituent combo control using the different styles.


Cheers
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.234 seconds.