TLabel in BorlandBuilder5 help!!!

This is a discussion on TLabel in BorlandBuilder5 help!!! within the C++ Programming forums, part of the General Programming Boards category; Can anyone give me an example on how to use the TLabel in Borland builder?
Thanks a lot!
Pete...

TLabel in BorlandBuilder5 help!!!

You choose the TLabel component from the component pallete. Then you click on the form where you want to put it. You can then change the text in the label by changing the Caption property in the object inspector.

Re: TLabel in BorlandBuilder5 help!!!

Thanks for your response. I tried that, but I doesn't give me the results I want.
All I want is to print "Hello world" and all I get is a grey screen without output.
As you can see I'm just learning this and any feedback on how to get that output will be appreciated.

2) click on the form(It's the grey window that will say something like "Form1" unless you changed that). It will display a label with the labels name as the caption.

3) there should be a windows to the left of the form called the object inspector. The top drop down list should say something like "Label1 : TLabel". and below the drop down listthere should be a list of properties. To change the text you change the text in the Caption property. On the form it should now say what you put in that property.

If you still can't figure it out, I could give you an example "Hello World" project.

Re: TLabel in BorlandBuilder5 help!!!

Hey Thanks again, I was able to print with the instructions. Is there any way I can print it just by using code as in the example?
If you can give an "Hello World" example with code and where to inserted, it would be great.

Re: TLabel in BorlandBuilder5 help!!!

Thanks once again for all your help! The only reason I wanted to do it like that is to practice what I learned in class today. In the Lab, we have this old compiler called Turbo C++ and even though it's from Borland, it does things differently. With that program, the only way to get that output is by typing the code shown in the example.

BCB and VC++ have the capacity to build projects in text (aka console or DOS) mode and graphical mode. TLabel is one way to get things shown on the screen in graphical mode. To use iostream and cout you would be in text/console/DOS mode however. If you click on File and then new application you should be given a menu of options as to which mode you wish to use to build/make the current project/application. Choose the Console/text/Dos mode option if you want to use text mode programming. Leave it at default setting if you wish to use graphical/Windows mode.

In Windows, all output to the screen is in graphical mode. cout and cin play no (or very little routine) role. Things are "event" driven, meaning a button is "pushed", the mouse moves over a given spot on the scree, a change occurs in an edit box secondary to user input, etc. none of which are pertinent to text mode. Although it isn't obvious when using BCB, use of classes, inheritance, etc. are useful in Windows, although use of control loops, knowing how lists, arrays, queues, etc. and even knowing about the standard template library all have a big impact. Learning how to program in text mode before going to graphical mode, eventhough you can make a basic Window program pretty easy with BCB, is something I think that will be worth your while.