Welcome! Log In Create A New Profile

Advanced

Sidebar

Posted by Mitchell 
Mitchell
Sidebar
April 15, 2008 08:15AM
Dear Windev Coders,
can somebody advise me how to add and remove an item or element inside the sidebar object programmatically. the reason is : in my main menu, I have a side on my main screen,and on the main menu i want to put a pop up on each menu item and this pop up called "add to Favorites", if it will be click,it must be added to "My Favorites" on the sidebar.


help please...

thanks.
Piet van Zanten
Re: Sidebar
April 15, 2008 04:10PM
Hi Mitchell,

You can add lots of invisible panes and then make them visible as needed:
Something like
i is int
bFlag is boolean

bFlag=False
for i=1 to MyBar..Occurrence
    if MyBar..Visible=False then
        MyBar..Caption=MyNewFavorite
        MyBar..Visible=True
        bFlag=True
        break
    end
end
if not bFlag then Error("Maximum favorites reached.")
You'll have to think of a way to orde the bars e.g. by switching captions.

Best regards,
Piet
Mitchell
Re: Sidebar
April 18, 2008 01:53PM
Hi Piet,
Thanks a lot. I will try it today.

regards
Mitchell
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: