Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Syntacs using CBuilder3

Posted on 1999-06-28
Medium Priority
Last Modified: 2010-04-02
Using CBuilder3, suppose I have a form with a ScrollBox  and TreeView component. I want to place an Image component or a Button component dynamically within the scrollBox for every image in the selected directory of the treeview component much like Imaging programs do. Can a CBuilder3 expert help.
Question by:Right
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

Dmitry_ earned 210 total points
ID: 1198631
 TButton *Button = new TButton(ScrollBox1);
  Button->Left = 10;
  Button->Top = 20;
  Button->Caption = "Click me";


Expert Comment

ID: 1198632
Most common mistake made (i think) is that the new component is not given a parent. You can see in the answer you already got from D here that the parent can be set in the instance. Also possible in stead of
new TButton(ScrollBox1) ;

Button->Parent = ScrollBox1;
If you don't give the control / component a name it'll be "floating" (of nulled) and you'll get the weirdest errors!

Good luck !


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question