Cableguy Expert Licensed User Longtime User May 29, 2015 #1 Hi guys I'm trying to implement an "AddToParent" method but I keep hitting walls I want my sub declaration as this Code: Copy Sub AddToParent( v as panel, Left as int, Top as Int, Height as int, Width as int) my initial approach was like this Code: Copy mBase.Initialize("") 'CustomView Base Panel mBase.RemoveView v.AddView(mBase, Left, Top, Width, Height This is a custom view with designer support but I get all sort of errors... Please help Last edited: May 29, 2015
Hi guys I'm trying to implement an "AddToParent" method but I keep hitting walls I want my sub declaration as this Code: Copy Sub AddToParent( v as panel, Left as int, Top as Int, Height as int, Width as int) my initial approach was like this Code: Copy mBase.Initialize("") 'CustomView Base Panel mBase.RemoveView v.AddView(mBase, Left, Top, Width, Height This is a custom view with designer support but I get all sort of errors... Please help
Erel B4X founder Staff member Licensed User Longtime User May 31, 2015 #2 Why do you need to sub? Usually you will want to add the view in the DesignerCreateView sub. Upvote 0
Cableguy Expert Licensed User Longtime User May 31, 2015 #3 Erel said: Why do you need to sub? Usually you will want to add the view in the DesignerCreateView sub. Click to expand... the Idea was to be able to add the view by code, wish I have successfully implemented in my NumUpDown v1.5 Upvote 0
Erel said: Why do you need to sub? Usually you will want to add the view in the DesignerCreateView sub. Click to expand... the Idea was to be able to add the view by code, wish I have successfully implemented in my NumUpDown v1.5
klaus Expert Licensed User Longtime User May 31, 2015 #4 Have a look at chapter 11.6 Display a custom view in the Designer in the User's Guide. In he ClsLimitBar2 example code the CusromView can be added either in the Designer or in the code. It uses four routines: The standard routines. Initialize DesignerCreateView And two addition routines: AddView, adds the view to the parent Init, initialisation routine called either by DesignerCreateView or AddView. Last edited: May 31, 2015 Upvote 0
Have a look at chapter 11.6 Display a custom view in the Designer in the User's Guide. In he ClsLimitBar2 example code the CusromView can be added either in the Designer or in the code. It uses four routines: The standard routines. Initialize DesignerCreateView And two addition routines: AddView, adds the view to the parent Init, initialisation routine called either by DesignerCreateView or AddView.
RandomCoder Well-Known Member Licensed User Longtime User May 31, 2015 #5 Thanks @klaus I'll have to refresh myself with the user manual again as I too could do with knowing how to do add designer support to a class I'm currently working on. Upvote 0
Thanks @klaus I'll have to refresh myself with the user manual again as I too could do with knowing how to do add designer support to a class I'm currently working on.
Cableguy Expert Licensed User Longtime User May 31, 2015 #6 klaus said: Take a look at chapter 11.6 Display a custom view in the Designer in the User's Guide. In he ClsLimitBar2 example code the CusromView can be added either in the Designer or in the code. It uses four routines: The standard routines. Initialize DesignerCreateView And two addition routines: AddView, adds the view to the parent Init, initialisation routine called either by DesignerCreateView or AddView. Click to expand... I did and that is why/how I managed to implement the "AddToParent" method to my NumUpDown. Many thanks to you @klaus Upvote 0
klaus said: Take a look at chapter 11.6 Display a custom view in the Designer in the User's Guide. In he ClsLimitBar2 example code the CusromView can be added either in the Designer or in the code. It uses four routines: The standard routines. Initialize DesignerCreateView And two addition routines: AddView, adds the view to the parent Init, initialisation routine called either by DesignerCreateView or AddView. Click to expand... I did and that is why/how I managed to implement the "AddToParent" method to my NumUpDown. Many thanks to you @klaus