473,770 Members | 2,065 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating Control Array in Borland C++ Builder 6.0

Hi,
can anyone help me on how to create a control array in C++ builder
like we create in VB.
I have another question regarding controls. I want to clear a group
of text boxes in the form on a button click. I am not using any
groupbox. how can i determine the control as Editbox and how can i
clear that.
any help would be appreciated.
thanx
Jul 19 '05 #1
3 8650
"Mani" <ma**********@y ahoo.com> wrote in message
news:2f******** *************** ***@posting.goo gle.com...
can anyone help me on how to create a control array in
C++ builder like we create in VB.
[...]


Point your newsreader at forums.borland. com or
news.borland.co m and subscribe to borland.public. cppbuilder.
vcl.using.

Dave
Jul 19 '05 #2
WW
Mani wrote:
Hi,
can anyone help me on how to create a control array in C++ builder
like we create in VB.


Please read this:
http://www.slack.net/~shiva/welcome.txt

--
WW aka Attila
Jul 19 '05 #3
Mani wrote:
Hi,
can anyone help me on how to create a control array in C++ builder
like we create in VB.
Read the FAQ about arrays. You can use an array or a vector.
Example:
Control my_controls[50]; // an array of 50 Controls.
std::vector<Con trol> my_other_contro ls; // A vector of Controls.

If there is a parent class, then you can have an array of pointers
to controls, and put in pointers to child classes:
class Button_Control
: public Control
{
// ...
}; /* a Button_Control _is_a_ Control */

std::vector<Con trol *> my_control_ptrs ; // Vector of Control ptrs.

Now if the Control class had a clear() method, you could do:
my_control_ptrs[0]->clear(); // Tell the first Control to clear.
or
for (unsigned int i = 0; i < my_controls_ptr s.size(); ++i)
{
my_control_ptrs[i]->clear();
}
for telling all the Controls to clear.

My brain is foggy at the moment, so I suggest you look at your C++
text book, compiler help manuals or the C++ FAQ for information
on declaring arrays of pointers.

I have another question regarding controls. I want to clear a group
of text boxes in the form on a button click. I am not using any
groupbox. how can i determine the control as Editbox and how can i
clear that.
Your other question is off-topic for this newsgroup. I have shown
how one method can be executed for a vector of objects. My intuition
says that the process is very similar.
any help would be appreciated.
thanx

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.l earn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2770
by: Steven O. | last post by:
First, sorry if by some chance I am not posting to the correct newsgroups, these seemed to be the most applicable to my question (see disclaimer at end of post for further comments....). Started with the Borland web site, and it didn't answer my questions, so I hope someone here will be kind enough to reply. I took a few courses on C++ using Microsoft Visual C++, and then taught myself MFC for GUI design -- an exercise akin to using...
15
3777
by: Chris | last post by:
I am just beginning programming again and need a bit of advice. I have both Visual C++ 6.0 Standard Edition and Borland C++ Builder 6. Of these two which do you consider the best for programming windows programs (not the DOS style program). I have had a quick look at both of these and Borland seems to have a lot more components (Buttons, Forms etc) than Microsoft Visual C++. Does Visual C++ have these components easily accesable. Chris.
2
2941
by: Thad | last post by:
Hello, I want to create some creative GUI's in C++ Builder 6. I have seen numerous skins, but want to use my own creativity and make my own. What tool(s) do I use to be able to do this? Im sure some of you have done this type of thing before. How did you go about doing it? Thanks! -Thad
9
4870
by: Christo | last post by:
hey im a student about to start a course in c++ at uni, we have been told to obtain a copy of borland c++ 5.01 (not c++ builder) this is just a program with a compiler/linker and development environment. it is simply called borland c++ 5.01 can anyone tell me where i can download either a free copy or a copy that needs registering or someething, i can only find c++ builder which is totally different from the program i have seen in...
6
2875
by: Verne | last post by:
Can anyone tell me where to look for some sample code programs for simple window developement by Builder 6 C++. I know the C++ fairly well but tryint to understand and learn how to use the Enterprise edidtion of Builder 6 by Borland. Please. Verne
24
3827
by: serdar | last post by:
Hi. Does anybody say that what is better borland c++ or visual c++? Which compiler does have more help?
1
1635
by: crash | last post by:
Hello, I need to connect to a DB2 database from Borland C++ Builder 6.0. I have used the core labs components for MSSQL and are very happy with them, however I don't believe that they have one for DB2. Does anyone have any good suggestions of a control to connect to DB2? Thanks for the help, Ben
0
3112
by: Xproblem | last post by:
FTP Client Engine for C/C++ 2.4 Screenshot - Soft.comFTP Client Engine for C/C++ 2.4. ... System Requirements: Windows C/C++ compiler - Microsoft operating system: Windows 95, Windows 98, Windows ME, ... www.soft30.com/screen-70-11625.htm - 31k - Cached - Similar pages C++ Server Pages 1.6 - Soft.comC++ Server Pages (CSP) allows developers to build Dynamic Web Pages and Web ... Existing C++ projects can be ported to the Web by simply...
22
2241
by: smartwolf agassi via DotNetMonster.com | last post by:
I'm a C# language learner. I want to know which IDE is better for C# programing, Borland C#Builder or VS.net 2003? -- Message posted via http://www.dotnetmonster.com
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10228
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10057
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10002
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8883
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7415
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6676
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3970
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.