|
-
January 16th, 2003, 09:06 AM
#1
Creating activex controls beginner question
Hi,
I am experimenting with creating activex controls. To test this i want to create a control that is based on a flexgrid, with a textbox so u can edit the flex.
I was able to create this control, but now i see that the flex-specific properties, methods and events aren't available. Is there a quick way to make them accessible from my control (feg the textmatrix method).
You don't have to give me an OCX that does this already, i want to learn how to make controls and thus want to do it my self
Thanx
-
January 16th, 2003, 01:17 PM
#2
I believe you can expose any property of standard control in your custom control.
Try to use "AciveX Ctrl Interface Wizard" add-in.
-
January 16th, 2003, 02:16 PM
#3
I haven't ever seen any tool that would map them for you, you'll have to do it manually. ie
Public Property Let SomeProp(s as string)
Flexgrid.SomeProp = s
end Property
-
January 16th, 2003, 02:52 PM
#4
Originally posted by DSJ
I haven't ever seen any tool that would map them for you,
Ok, here is how wizard can do it for you.
1) create ActiveX Control project and place MSFlexGrid on the form;
2) go in Add-in manager and load "AciveX Ctrl Interface Wizard";
3) run this add-in from Add-Ins menu, click Next to skip Introduction screen;
4) now you presented with two lists: find "TextMatrix" in the left list and move it to the right list; click Next;
5) click Next agaiin;
6) now you're in "Set Mapping" form: select your "TextMatrix" in the "Public Name" list; in "Control" drop-down pick the name or your MSFlexGrid control; in the "Member" drop-down you will see correct corresponding property;
7) click Next and Finish to exit Wizard.
Now your custom control will have TextMatrix property available for outside callers.
-
January 16th, 2003, 02:58 PM
#5
You still have to manually map all the properties though, right? In other words you can't in one step say I want to select and map all properties of the flexgrid to corresponding props. on the usercontrol. In fact, I don't think ALL the flexgrid properties show up in the list to choose from do they?
-
January 16th, 2003, 03:14 PM
#6
Ok, agree. You still have to do some work after wizard.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|