473,322 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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 8598
"Mani" <ma**********@yahoo.com> wrote in message
news:2f**************************@posting.google.c om...
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.com 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<Control> my_other_controls; // 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<Control *> 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_ptrs.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.learn.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
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...
15
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...
2
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...
9
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...
6
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...
24
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
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...
0
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...
22
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.