(HOW?) Assigning value of TDBEdit to a TLabel 
Author Message
 (HOW?) Assigning value of TDBEdit to a TLabel



>Newsgroups: comp.lang.Pascal.delphi.components
>Subject: assigning value of a TDBEdit to a TLabel (HOW?)
>Organization: Dept. of Computer Science, University of Ottawa

>Here's my problem,

>I want to assign the value contained in one of my TDBEdit's in a
TLabel on
>another form (I have no problem assigning a TLabel on one form to
>TLabel on another form).  The problem is that it doesn't look like
>is a text or value property in TDBEdit.  How would I go about doing
what I
>want without changing my TDBEdit object.

>Daniel Lortie

>Any help will be greatly appreciated!!!

Two ways.
1.  Label1.Text := DBEdit1.Text;

2.  Say the dbedit box is connected to fielda in table1. So  you write:
        Label1.Text := Table1Fielda.Value;
    If fielda is not of string type you will have to convert
    the field i.e. :
        Label1.Text := InttoStr(Table1Fielda.Value);

Arrow Software

Sat, 16 May 1998 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. (HOW?) Assigning value of TDBEdit to a TLabel

2. DBLookupComboBox - how to assign a value?

3. assigning sql values to variables

4. How to assign this values in pascal ?

5. TBatchMove component allow assigning value during execute?

6. Beginner: Delphi 1, Assigning Values to dialog objects

7. Assigning value to a DBComboLookUp Box

8. Limiting the number of values that can be assigned to a field

9. Help - Table fields with no values assigned to them

10. How to I assign a value to DBEdit1 ?

11. Assigning value to binary field. PLEASE HELP

12. Using the Date value for assigning Today's date to a field


Powered by phpBB® Forum Software