Hi!
I am working on a generic toolbar-class which will work in conjunction with the active form.
On the toolbar I do have a button(1) which has to fire a method on the active form e.g. for doing sort or search.
Next to that toolbar-button I do have a small button(2) with down-arrow to select 'how to sort' or 'on what to search'.
Both buttons are in a container and are class-members (item of class library).
This container classmember sits in the toolbar.
The aim is to let this container have only generic code.
On the active form I do have custom array-properties like
aSort[] and aSearch[]. These do hold the required data for sort and search.
I added two custom properties to the toolbarcontainer.
-1- Method2Fire
-2- Array2SelectFrom
Method2Fire has value like 'SortForm' or 'SearchForm'. These methods do exist on the active form.
So by clicking toolbarbutton(1) I can fire 'SortForm
'
Sortdata is in form-array[]. n decides how to sort.
So far so good.
Clicking toolbarbutton2 fires a small 'select'-form holding only radiobuttons which in turn have to display values of the activeform array e.g. aSort.
My Q:
The name 'aSort' is put at designtime in the toolbar container property.
How can I pass this name through to the 'select'-form in such as way that the 'select'-form can use that name by picking-up the array-values, required to populate the radiobutton captions. Of course all with generic code.
At this moment this all works fine but I hardcoded the arrayname in the 'select'-form which is bad behaviour for class-desgn.
Hope someone can give me a hand on this.
-Bart
I am working on a generic toolbar-class which will work in conjunction with the active form.
On the toolbar I do have a button(1) which has to fire a method on the active form e.g. for doing sort or search.
Next to that toolbar-button I do have a small button(2) with down-arrow to select 'how to sort' or 'on what to search'.
Both buttons are in a container and are class-members (item of class library).
This container classmember sits in the toolbar.
The aim is to let this container have only generic code.
On the active form I do have custom array-properties like
aSort[] and aSearch[]. These do hold the required data for sort and search.
I added two custom properties to the toolbarcontainer.
-1- Method2Fire
-2- Array2SelectFrom
Method2Fire has value like 'SortForm' or 'SearchForm'. These methods do exist on the active form.
So by clicking toolbarbutton(1) I can fire 'SortForm
Sortdata is in form-array[]. n decides how to sort.
So far so good.
Clicking toolbarbutton2 fires a small 'select'-form holding only radiobuttons which in turn have to display values of the activeform array e.g. aSort.
My Q:
The name 'aSort' is put at designtime in the toolbar container property.
How can I pass this name through to the 'select'-form in such as way that the 'select'-form can use that name by picking-up the array-values, required to populate the radiobutton captions. Of course all with generic code.
At this moment this all works fine but I hardcoded the arrayname in the 'select'-form which is bad behaviour for class-desgn.
Hope someone can give me a hand on this.
-Bart