I am trying to trying to hide a list box of CAknSingleLargeStyleListBox type once an item in the list is selected and activate a new listbox of a different type. However when i hide the listbox by using MakeVisible(EFalse) the listbox looses focus as expected but unfortunately the listbox does not get erased from the screen but rather just becomes transparent and remains in the background. iwant to know how to clear the screen once the listbox is made invisible so that the contents of the lisbox are no more visible. I do not want to destroy the listbox and its content because i want to reuse it again later in the program.
hmmm. So you basically want to switch the listboxes on fly.
So, I would basically just have a CCoeControl pointer in the class that has the right pointer to the currently active listbox. And then just set it right when needed and call Drawnow.
then in your Count controls function I would return one for the count of listboxes & component control function I would return the CCoeControl pointer , so the right listbox should then get drawn correctly.
Thank you for your response.
Actually i do have some idea as to how to change the listbox dynamically. But the real problem I am facing is that when I try to hide the previous listbox using MakeVisible(EFalse) the listbox does loose focus as expected but somehow it does not get cleared from the screen even after calling DrawNow with gc.Clear() in it(as seen in my code above). what i feel is that gc.clear only clears the objects like lines and text drawn with the system gc(graphics context) however things drawn in listbox by default (like icons, text,highlight and so on)within the listbox controll do not get cleared, even after calling iListBox->DrawNow(). I dont know how to upload a file otherwise i could send you the sis file so that you could see exactly what i mean.