两个问题1)两个edit相加在第三个edit上得出值2)下拉单中选一值在另一list中得出对应值 两个问题1)两个edit相加在第三个edit上得出值2)下拉单中选一值在另一list中得出对应值 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 if (edit1.text='') or (edit2.text='') then beginshowmessage('数据类型不对');exit;end;edit3.text:=inttostr(strtoint(edit1.text)+strtoint(edit2.text)); 或者 edit3.text:=floattostr(strtofloat(edit1.text)+strtofloat(edit2.text)); 判断输入的是否是数字 If not( Key in ['0'..'9',#8]) Then Key:=#0; 还应该有小数点的edit3.text:=floattostr(strtofloat(edit1.text)+strtofloat(edit2.text)); 2:procedure TForm1.ComboBox1Click(Sender: TObject);begin listbox1.Clear; listbox1.Items.Add(combobox1.Text);end; 请教个问题:关于TComboBox控件获得交点的问题 简单的快捷键问题 各位高手,你们遇到这种情况吗? grid的filter中增加add group的问题 急... DBGrid问题(在线等待!) 如何去除重复值? 请教如何利用ADO编程 (高分求助!UP有分)怎么可以让Listbox(或者其他的相同控件)输出彩色的文字! 天啊!快救救我!不知中了什么病毒,系统崩溃,源码全在里面啊!!! 初学DELPHI用什么书. 高手请进,文件查找的问题,估计好多人都不会的? 有一个字符串变量S1,如何在程序中将它加入到RICHEDIT1组件里的LINES里?
begin
showmessage('数据类型不对');
exit;
end;edit3.text:=inttostr(strtoint(edit1.text)+strtoint(edit2.text));
If not( Key in ['0'..'9',#8]) Then
Key:=#0; 还应该有小数点的
edit3.text:=floattostr(strtofloat(edit1.text)+strtofloat(edit2.text));
procedure TForm1.ComboBox1Click(Sender: TObject);
begin
listbox1.Clear;
listbox1.Items.Add(combobox1.Text);
end;