Home All Groups Group Topic Archive Search About
Author
17 Apr 2007 2:55 AM
Allen Maki

Hi Everybody,



I am new to Famework Programming and I need your help.



In Visual C++ .NET

Forms.

Labels.



If I want to add XXXX to the label, I can do that through the "Text"
property in the property editor.  But I want to add the XXXX during run
time.  In other words I want the label to be written during run time.



void InitializeComponent(void)

            {

//

// label2

//

this->label2->Location = System::Drawing::Point(32,16);

                  this->label2->Name = S"label2";

                  this->label2->Size = System::Drawing::Size(208, 23);

                  this->label2->TabIndex = 6;

                  this->label2->Text = S"XXXX";

}

Author
17 Apr 2007 4:11 AM
Bryan Phillips
Then add

this->label2->Text = S"XXXX";

to your form's load event handler.

--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog:  http://bphillips76.spaces.live.com
Web Site:  http://www.composablesystems.net



Show quoteHide quote
"Allen Maki" <allenm***@sbcglobal.net> wrote in message
news:hGWUh.17172$Um6.16890@newssvr12.news.prodigy.net:

> Hi Everybody,
>
>
>
> I am new to Famework Programming and I need your help.
>
>
>
> In Visual C++ .NET
>
> Forms.
>
> Labels.
>
>
>
> If I want to add XXXX to the label, I can do that through the "Text"
> property in the property editor.  But I want to add the XXXX during run
> time.  In other words I want the label to be written during run time.
>
>
>
> void InitializeComponent(void)
>
>             {
>
> //
>
> // label2
>
> //
>
> this->label2->Location = System::Drawing::Point(32,16);
>
>                   this->label2->Name = S"label2";
>
>                   this->label2->Size = System::Drawing::Size(208, 23);
>
>                   this->label2->TabIndex = 6;
>
>                   this->label2->Text = S"XXXX";
>
> }
Are all your drivers up to date? click for free checkup

Author
17 Apr 2007 7:45 PM
Allen Maki
Hi Bryant,

Thank you for your help.

You want me to do it like this:

private: System::Void label2_Click(System::Object * sender,
System::EventArgs * e)

{

this->label2->Text = S"XXXX";

}

I appreciate any details you may give.




Show quoteHide quote
"Bryan Phillips" <bphillips@nospam.spamcop.net.spammenot> wrote in message
news:uwViMaKgHHA.4980@TK2MSFTNGP02.phx.gbl...
> Then add
>
> this->label2->Text = S"XXXX";
>
> to your form's load event handler.
>
> --
> Bryan Phillips
> MCSD, MCDBA, MCSE
> Blog:  http://bphillips76.spaces.live.com
> Web Site:  http://www.composablesystems.net
>
>
>
> "Allen Maki" <allenm***@sbcglobal.net> wrote in message
> news:hGWUh.17172$Um6.16890@newssvr12.news.prodigy.net:
>
>> Hi Everybody,
>>
>>
>>
>> I am new to Famework Programming and I need your help.
>>
>>
>>
>> In Visual C++ .NET
>>
>> Forms.
>>
>> Labels.
>>
>>
>>
>> If I want to add XXXX to the label, I can do that through the "Text"
>> property in the property editor.  But I want to add the XXXX during run
>> time.  In other words I want the label to be written during run time.
>>
>>
>>
>> void InitializeComponent(void)
>>
>>             {
>>
>> //
>>
>> // label2
>>
>> //
>>
>> this->label2->Location = System::Drawing::Point(32,16);
>>
>>                   this->label2->Name = S"label2";
>>
>>                   this->label2->Size = System::Drawing::Size(208, 23);
>>
>>                   this->label2->TabIndex = 6;
>>
>>                   this->label2->Text = S"XXXX";
>>
>> }
>
Author
18 Apr 2007 12:20 AM
Bryan Phillips
If that is where you need the text property to be set, then yes.

--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog:  http://bphillips76.spaces.live.com
Web Site:  http://www.composablesystems.net



Show quoteHide quote
"Allen Maki" <allenm***@sbcglobal.net> wrote in message
news:Tt9Vh.6924$5e2.3929@newssvr11.news.prodigy.net:

> Hi Bryant,
>
> Thank you for your help.
>
> You want me to do it like this:
>
> private: System::Void label2_Click(System::Object * sender,
> System::EventArgs * e)
>
> {
>
> this->label2->Text = S"XXXX";
>
> }
>
> I appreciate any details you may give.
>
>
>
>
> "Bryan Phillips" <bphillips@nospam.spamcop.net.spammenot> wrote in message
> news:uwViMaKgHHA.4980@TK2MSFTNGP02.phx.gbl...
> > Then add
> >
> > this->label2->Text = S"XXXX";
> >
> > to your form's load event handler.
> >
> > --
> > Bryan Phillips
> > MCSD, MCDBA, MCSE
> > Blog:  http://bphillips76.spaces.live.com
> > Web Site:  http://www.composablesystems.net
> >
> >
> >
> > "Allen Maki" <allenm***@sbcglobal.net> wrote in message
> > news:hGWUh.17172$Um6.16890@newssvr12.news.prodigy.net:
> >
> >> Hi Everybody,
> >>
> >>
> >>
> >> I am new to Famework Programming and I need your help.
> >>
> >>
> >>
> >> In Visual C++ .NET
> >>
> >> Forms.
> >>
> >> Labels.
> >>
> >>
> >>
> >> If I want to add XXXX to the label, I can do that through the "Text"
> >> property in the property editor.  But I want to add the XXXX during run
> >> time.  In other words I want the label to be written during run time.
> >>
> >>
> >>
> >> void InitializeComponent(void)
> >>
> >>             {
> >>
> >> //
> >>
> >> // label2
> >>
> >> //
> >>
> >> this->label2->Location = System::Drawing::Point(32,16);
> >>
> >>                   this->label2->Name = S"label2";
> >>
> >>                   this->label2->Size = System::Drawing::Size(208, 23);
> >>
> >>                   this->label2->TabIndex = 6;
> >>
> >>                   this->label2->Text = S"XXXX";
> >>
> >> }
> >

Bookmark and Share