Free Pascal => Beginners => Topic started by: jcaser1948 on January 08, 2018, 08:16:17 am
Title: Newbie question over TEdit
Post by: jcaser1948 on January 08, 2018, 08:16:17 am
Dear all A happy new year to everyone I use OPensuseLinux Leap 42.3 and Lazarus 1.8 I need some help in understanding the Logic of TEdit I have a programm with a bunch of variables .I will show them in a cople of tEdits, modify their values and store them again in the variables I use the On Change event of T edit Hiere the example code
procedure TForm1.EPabKWChange(Sender: TObject);
begin pabkw:=1; try EPabKW.text:= FloatToStrF(pabkw,ffFixed,7,2); pabkw:=strtofloat(EPabKW.text); {here I change the value manually in T Edit and send it again to the variable to be processed} EPabKW.text:=FloatToStrF(pabkw,ffFixed,7,2); except
EPabKW.clear; end; //try
end; // EPabKW.text Change I can see in the Tedit display the value 1, but when I try to change the value nothing happens Wha do I do wrong? Is th On change event the most appropriate? Thanks
Title: Re: Newbie question over TEdit
Post by: balazsszekely on January 08, 2018, 08:47:30 am
Hi Jcaser1948,
Please switch to TFloatSpinEdit(Misc tab). Show the values like this: