Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Add a item to submenu from a register or file

How can I add more then on text from a registory or a file source
I tryed with registory

[code]
NewItem := TMenuItem.Create(Self);
NewItem.Caption := WindowsMediaPlayer1.URL;

rIniFile.WriteString('Preferences', 'Stations', WindowsMediaPlayer1.URL);

rIniFile.WriteBool('Preferences', 'Content', ViewContent1.Checked);
MainMenu1.Items.Items[2].Items[1].Add(NewItem);
[code]

but it only adds one I want it to be able to add more then one to registory then read and add them to menu list allso when adding from registory

take makes menu like this

SPACE
RADIO URL FROM REG

how can I remove the space so it only adds the radio url??

thanks for help
Slewis

Comments

  • zibadianzibadian Member Posts: 6,349
    : How can I add more then on text from a registory or a file source
    : I tryed with registory
    :
    : [code]
    : NewItem := TMenuItem.Create(Self);
    : NewItem.Caption := WindowsMediaPlayer1.URL;
    :
    : rIniFile.WriteString('Preferences', 'Stations', WindowsMediaPlayer1.URL);
    :
    : rIniFile.WriteBool('Preferences', 'Content', ViewContent1.Checked);
    : MainMenu1.Items.Items[2].Items[1].Add(NewItem);
    : [/code]
    :
    : but it only adds one I want it to be able to add more then one to registory then read and add them to menu list allso when adding from registory
    :
    : take makes menu like this
    :
    : SPACE
    : RADIO URL FROM REG
    :
    : how can I remove the space so it only adds the radio url??
    :
    : thanks for help
    : Slewis
    :
    You can use the Tag property to mark which menu items you wish to add. Then it is a matter of looping through the submenu adding those that are marked.
Sign In or Register to comment.