![]() |
| | #1 |
| Registered User Join Date: Jul 2006
Posts: 43
| c++builder6 change form names problem I have a question on a practical problem in optical programming with c Builder 6.I have made a project with forms and buttons and etc.I didnt put the name i want on form captions of forms so the forms are form1 form2 form3. Now i wanna change these names so be more specific about what forms do. For example change form1 name and put Introduction form. In this point i wonder how the code on my program will change automatically. If for example is form1->close(); how will change when i will change the name of form. To close i want the programm run with new names but with no mistakes. If everyone have any idea please post it. Thank you |
| Leite33 is offline | |
| | #2 |
| Kernel hacker Join Date: Jul 2007 Location: Farncombe, Surrey, England
Posts: 15,686
| You want a "refactor" feature like Eclipse has - with that, you can globally rename a particular name within the whole project. Having said that, it's usually fairly easy to just change the name with a global search/replace operation (only caveat is if you are using the same name for multiple purpose in different places, and don't want to change all places). The compiler will (99% of the time) tell you if you missed one. I'd suggest you make one change at a time and test thoroughly after each change - it's so much easier to check a few changes for where it went wrong than to check hundreds. -- Mats
__________________ Compilers can produce warnings - make the compiler programmers happy: Use them! Please don't PM me for help - and no, I don't do help over instant messengers. |
| matsp is offline | |
| | #3 |
| 3735928559 Join Date: Mar 2008
Posts: 662
| at runtime simply call it as: formName->Caption = String; or at design time, bring the form to the foreground and set it in the object inspector. there is also the Name property, and IIRC, if Name == Caption, changing the Name property automatically changes the Caption also. At least it does at design time, never tried it during runtime. |
| m37h0d is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem with some simple code =/ | Josh Norton | C++ Programming | 3 | 02-23-2004 06:27 AM |
| help with calculating change from a dollar | z.tron | C++ Programming | 3 | 09-13-2002 03:58 PM |
| A change.... a problem! | CodeMonkey | C++ Programming | 2 | 03-15-2002 10:16 PM |
| Help with a bit of tweeking on form feed | breed | C Programming | 5 | 11-27-2001 06:45 AM |
| trying to make change from the price of the item and the amount given. please help!!! | tobyman | C++ Programming | 2 | 09-04-2001 02:12 PM |