Toolbar2000, dynamically adding TTBItems
- From: David Perkins <please@xxxxxxxxxxx>
- Date: Tue, 28 Feb 2006 10:19:32 +0000
I've created a toolbar which contains a TTBSubmenuItem. I then want to populate this submenu at runtime to create a vertical drop down menu.
I use the following code:
TTBItem * p;
for(int i=0; i<pSL->Count; i++)
{
p = new TTBItem(this);
p->Caption = pSL->Strings[i];
p->OnClick = ExampleMsgTxtClick;
btnMsg->Add(p);
}
Where btnMsg is a TTBSubmenuItem. When I run my app and click on btnMsg I get a horizontal menu displayed, when I want a vertical list of the TTBItems.
I've used similar code elsewhere in my App and it does create a verticall drop-down menu, however, the equivalent btnMsg and TIBItems use bitmaps (if that makes any difference).
Using TB2k 2.1.6
Any ideas?
Thanks
.
- Follow-Ups:
- Re: Toolbar2000, dynamically adding TTBItems
- From: Oliver Townshend
- Re: Toolbar2000, dynamically adding TTBItems
- Prev by Date: Re: What is the benefit to me of .NET as an end-user?
- Next by Date: Re: What is the benefit to me of .NET as an end-user?
- Previous by thread: Re: Determining "unit cost" in a Compiled Delphi Program
- Next by thread: Re: Toolbar2000, dynamically adding TTBItems
- Index(es):