Variables in labels? lazarus / 9-Editor ---------------------------------------------------------------------- T-bear · 2010-10-10 10:53 Hello I have a little questions about labels: Is it possible to show the value of a variable in a label, and if, how? Thanks! ---------------------------------------------------------------------- typo · 2010-10-10 11:00 Well, why not? Simply set the appropriate data type to the Caption property. ---------------------------------------------------------------------- T-bear · 2010-10-10 11:13 And how do i do that? ---------------------------------------------------------------------- typo · 2010-10-10 11:19 If the variable is of string type, simply set: Code: [Select]Label.Caption := variable; If it is of integer type, set: Code: [Select]Label.Caption := IntToStr(variable); ---------------------------------------------------------------------- T-bear · 2010-10-10 11:21 Thank you. ---------------------------------------------------------------------- mas steindorff · 2010-10-11 16:00 FYI almost all the components have a .tag property that you can use for your self.  the int can be set to the value when you set it's label then you can access it faster later on. read lables value x:= strtoint(lable1.caption) or x := lable1.Tag set labes value or the code above will not work label1.caption := inttostr(x);  // set  text lable1.tag := x;                   // and save as int