Показать сообщение отдельно
  #4  
Старый 24.12.2010, 18:08
Аватар для EvilRussian
EvilRussian EvilRussian вне форума
Начинающий
 
Регистрация: 21.12.2010
Адрес: Россия, Красноярский край
Сообщения: 177
Репутация: 22
Счастье

Тогда быстро мне в падлу придумывать красивый способ

В общем так, сначала ставим на форму, допустм, двадцать TPicture с шариками, выставив им всем visible:=false в свойствах.

Затем ставим такой код в OnChange Edit'ов:

Код:
var x,y,z: integer;
begin
Picture1.Visible:-false; //так для всех картинок
...
try
 x:=strtoint(Edit1.Text);
except
 x:=0
end;
try
 y:=strtoint(Edit2.Text);
except
 y:=0
end;
z:=x+y;
if z>0 then Picture1.Visible:=True;
if z>1 then Picture2.Visible:=True;
if z>2 then Picture3.Visible:=True;
if z>3 then Picture4.Visible:=True;
if z>4 then Picture5.Visible:=True;
if z>5 then Picture6.Visible:=True;
if z>6 then Picture7.Visible:=True;
if z>7 then Picture8.Visible:=True;
if z>8 then Picture9.Visible:=True;
if z>9 then Picture10.Visible:=True;
if z>10 then Picture11.Visible:=True;
if z>11 then Picture12.Visible:=True;
if z>12 then Picture13.Visible:=True;
if z>13 then Picture14.Visible:=True;
if z>14 then Picture15.Visible:=True;
if z>15 then Picture16.Visible:=True;
if z>16 then Picture17.Visible:=True;
if z>17 then Picture18.Visible:=True;
if z>18 then Picture19.Visible:=True;
if z>19 then Picture20.Visible:=True;
end;

Вот так вот. Вопросы?
__________________
Если не ты, то кто?
(с) Терри Пратчетт

Не забывайте ставить плюсы и говорить спасибо!
Ответить с цитированием