Forum > Arabic

معرفة أدوات النموذج

<< < (7/7)

Al-Eid:

--- Quote from: Zaher on August 15, 2021, 01:47:25 pm ---للدقة لا يفترض ان تعمل مصفوفة عامة ترجع فيها معلومات مؤقتة
يعني arrNumbercontrol موقعها خطأ
 ان ترجعها من الدالة نفسها وهو الحل الافضل

--- End quote ---

أنظر لهذا الكود هل تقصد هكذا

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- unit Unit2; {$mode objfpc}{$H+} interface uses  Classes, SysUtils,Forms,Controls, Graphics, Dialogs, StdCtrls;Type  TNumbercontrol = array of Integer ;  function FCountControls(varform: TWinControl; AClass: TControlClass):TNumbercontrol; implementation function FCountControls(varform: TWinControl; AClass: TControlClass): TNumbercontrol;var  i: Integer; // i متغير للحلقةbegin  for i := 0 to varform.ControlCount - 1 do  begin    // هذه الحلقة تقوم بالبحث عن الأدواة edit    // وسط أدوات الـفورم    if varform.Controls[i] is AClass then    begin      SetLength(FCountControls, Length(FCountControls) + 1);      // عند وجود أداة من نوع Edit يضيف رقم الترتيب للأداة في لوحة النصوص      FCountControls[High(FCountControls)] := i;    end;  end; end; end.  
وهذا كود button


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- procedure TForm1.Button1Click(Sender: TObject); var i : Integer;  arry : array of Integer ; begin  arry := FCountControls(form1,Tedit); if Length(arry)>0 then Begin   for i := 0 to high(arry) do   Begin    Showmessage(Tbutton(form1.Controls[arry[i]]).Caption) ;   end  end;end;                                            

nouzi:
العيد
العفو ، لا داعي لشكر كل هنا من أجل التعلم
اعدرني لم استطيع المشاركة في الشفرة لبعض الضروف،  انشاء الله نصائحي في الموضوع  كنت في مواضيعها ومفيدة

Zaher:
يرجى التخفيف من التشكرات و التبريك و المدح  والاقتصار على الامور المفيدة
على الاقل خفف ال qoute

Navigation

[0] Message Index

[*] Previous page

Go to full version