Hello guys,
I`m struggling with this for a few days and any idea or advice is more than welcomed .
i`ve created 2 container controls which are 2 list boxes with some buttons and fields.
The workflow is like this for the moment :
masterContainercontrol
searchContainer.
in the master control i have a button where i set the second container controls as (dim SearchPopup As New SearchContainer
) then i populate the listbox within the new declared container and all works perfect.
i add the container control on the window and it will be ccm1(Super : masterContainercontrol)
on the ccm1 i have another listbox where i have to paste the selected data in the SearchPopup, but because it is different control all the time on both parts i cannot control or i cannot get the control on which is which. so i cannot use this code :
[code] dim wordIdx, wordCount as integer
wordCount = lbSearch.listCount - 1
dim name as string
for wordIdx = wordCount downTo 0
if lbSearch.selected(wordIdx) then
lbATCD.AddRow(lbSearch.Cell(wordIdx,0))
end if
next
[/code]
now, how i can reference the container controls in the new defined controls in the window so they can interact to each other ?
the idea is to have like a master listbox with a popup in which i have a search field and a listbox which is dynamically populated according to the input from the search field, more like a filter, then the user selects the multiple fields and once mouse Exit is triggered then the records should be transferred into the master list and popup should close.
I could avoid using the container control but the problem is that i have around 80 controls based on this container control and to create this control that many times i go crazy and then does not use DRY anymore so bad coding, just trying to simplify the usage of the design.
Thanks a lot in advance, im simply out of ideas and i
m sure that it is just a simple thing .