BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to change the caption of a menu item?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
José
Guest





PostPosted: Sat May 12, 2007 10:10 pm    Post subject: How to change the caption of a menu item? Reply with quote



How to change the caption of a menu item?

The obvious things do not work, for example:

1: Form1->Open1->Caption="Ouvrir";
2: Form1->Mainmenu1->Open1->Caption="Ouvrir";
3: Form1->MainMenu1->Items->Caption="Ouvrir";

1 and 2 are rejected by the compiler: Open1 is not a member of...
In 3 I did not specify which menu item must be changed, so that it is
certainly wrong, but the compiler accepts it. On execution the
statement appears to do nothing.
--
José
Back to top
Vladimir Stefanovic
Guest





PostPosted: Sat May 12, 2007 11:39 pm    Post subject: Re: How to change the caption of a menu item? Reply with quote



Quote:
1: Form1->Open1->Caption="Ouvrir";

Look at header file, and locate the TMenuItem name,
something like:

--- H ---
TMenuItem *Open1;

Then, you code should look line this:
--- CPP ---
Open1->Caption="Ouvrir";


--
Best Regards,
Vladimir Stefanovic
Back to top
José
Guest





PostPosted: Sun May 13, 2007 1:02 am    Post subject: Re: How to change the caption of a menu item? Reply with quote



On Sat, 12 May 2007 20:39:37 +0200, "Vladimir Stefanovic"
<antivari (AT) po (DOT) sbb.co.yu> wrote in
borland.public.cppbuilder.vcl.components.using:

Quote:
Look at header file, and locate the TMenuItem name,
something like:

--- H ---
TMenuItem *Open1;

Then, you code should look line this:
--- CPP ---
Open1->Caption="Ouvrir";

Thanks. It's obviously a bug in CPP Builder. The TMenuItem are not
automatically added to the header file. When I added them manually,
the problem was solved.
--
José
Back to top
Vladimir Stefanovic
Guest





PostPosted: Sun May 13, 2007 1:44 am    Post subject: Re: How to change the caption of a menu item? Reply with quote

Quote:
Thanks. It's obviously a bug in CPP Builder. The TMenuItem
are not automatically added to the header file.

I don't think so...
I think you must have been deleted it somehow by accident.

BCB as two-way tool (IDE <->CODE) really can be harmed by
many ways.




--
Best Regards,
Vladimir Stefanovic
Back to top
José
Guest





PostPosted: Sun May 13, 2007 1:57 am    Post subject: Re: How to change the caption of a menu item? Reply with quote

On Sat, 12 May 2007 22:44:16 +0200, "Vladimir Stefanovic"
<antivari (AT) po (DOT) sbb.co.yu> wrote in
borland.public.cppbuilder.vcl.components.using:

Quote:
Thanks. It's obviously a bug in CPP Builder. The TMenuItem
are not automatically added to the header file.

I don't think so...
I think you must have been deleted it somehow by accident.

Well, to test it, I created a menu in a fresh program, and this time
it worked. But I have no idea who deleted them. I certainly didn't -
not even by accident. There must be something wrong.

I have Builder version 4.
--
José
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.