A question about Borland C++ 6 builder

Discuss any other topics here
Post Reply
User avatar
LtForce
Posts: 437
Joined: Wed May 03, 2006 11:15 am
Location: Vilnius, Lithuania

A question about Borland C++ 6 builder

Post by LtForce »

This question is not about RF, but I'm learning to program with C++ now and I can't figure out this problem. Here's the script:

Code: Select all

//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
Edit1:Text="Hello";
}
//---------------------------------------------------------------------------
This is supposed to di this: when I press button 1 Edit1's text is supposed to turn "Hello", but it doens't. It all happens wrong - the main window's name turns Hello. If you don't understand what I'm talking about (I don't yet know how to speak english about programming very well) I'll post some screens
Lithuanians for Georgia!
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

I don't have bc++6 so I can only guess... it probably should be

Code: Select all

Edit1->Text = "Hello";
or

Code: Select all

Edit1->SetText("Hello");
or something like that...
User avatar
LtForce
Posts: 437
Joined: Wed May 03, 2006 11:15 am
Location: Vilnius, Lithuania

Post by LtForce »

Thanks!
Lithuanians for Georgia!
Post Reply