Change the name of a button
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/08/2005 at 07:47, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.102
Platform: Windows ;
Language(s) : C++ ;---------
I want to change the name of a button in my
plugins GUI. I tried:SetString(IDC_BUTTON, "New Text");
Nothing happens.
Do I need to add an Event or is that
late change simply not possible? -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/08/2005 at 23:38, xxxxxxxx wrote:
You can change it ...
But as you said ... in an event that you wish ...Let's say .. there is a code in CreateLayout function ...
//In CreateLayout
AddButton(BTN_RENAME,0,100,10,"Rename");And then in Command function ...
//In Command
switch(id)
{
case BTN_RENAME:
{
SetString(BTN_RENAME,"NewName");
}
break;
}If nothing happens ... please make it sure you didn't use the id of the button to other controls ..
Sometimes it may happen like below ..#define BTN_RENAME 1111
AddStaticText(1111,....
AddButton(BTN_RENAME,....Hope it can help you ...
ZawMinTun -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 31/08/2005 at 00:50, xxxxxxxx wrote:
Thanks for the help,
but I already did it this way, except,
that the button isn't added at runtime,
but generated with the Resource-Editor,
as recommended by the API doc.Changing another static text (also pre-
defined) works. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/09/2005 at 10:25, xxxxxxxx wrote:
This was my fault,
one shouldn't use an ID (IDC_NAME)
for a button and a group-id.
An ID should be unique in the *.res
file.Ok, this was trivial, but just in case
someone finds my question after biting
in the carpet with a similiar problem...