Dynamic Objects in Delphi (Advanced)

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ธ.ค. 2024

ความคิดเห็น •

  • @maztanto2080
    @maztanto2080 4 ปีที่แล้ว +1

    Setting value of Tag when you create each button, and then using its tButton.Tag will most easily ,
    isum := isum + (Sender as TButton).Tag

  • @aaronxalapa
    @aaronxalapa 2 ปีที่แล้ว

    best chnnel on youtube... thank you so much

  • @Prototyp8
    @Prototyp8 ปีที่แล้ว

    How would i reset a form after the created components are no longer necessary

  • @tirt
    @tirt 2 ปีที่แล้ว

    Is there a way you can create as many buttons as your while loop runs?
    For example, a while loop runs 5 times and creates 5 buttons.
    But another time, the while loop runs 9 times and then it will create 9 buttons.
    An array wouldn't work as it is limited.

    • @MrLongITandCAT
      @MrLongITandCAT  2 ปีที่แล้ว +3

      I would still use an array but have for example
      arrButtons : array[1..100] of TButton ;
      Then have a global integer called iButtonMax which is the number of buttons you want. You can change that variable but all your code will be using for loops like
      for i := 1 to iButtonMax do
      begin
      arrButtons[ i ] := TButton.V=Create... etc

  • @DSOrton
    @DSOrton 5 ปีที่แล้ว

    Hi, what do you do if you use images instead of buttons, how do you extract the data from a TImage as it has no caption?

    • @dAsRoNeYxD
      @dAsRoNeYxD 5 ปีที่แล้ว

      You can use the Tag to identify the picture.

  • @brockwilliams3080
    @brockwilliams3080 4 ปีที่แล้ว +2

    TButton(Sender).X is better than doing (Sender as TButton).X
    You already know the type in your global array declaration.

  • @TheAlbertoBallerini
    @TheAlbertoBallerini 5 ปีที่แล้ว +1

    Well and clean explained!

  • @KrowKaws
    @KrowKaws 5 ปีที่แล้ว

    anyone know to create dynamic components across forms?

  • @aminox777able
    @aminox777able 4 ปีที่แล้ว

    Thank very much indeed, good job..

  • @suleymany146
    @suleymany146 2 ปีที่แล้ว +2

    top:= 20+i*(height+5) very simple

  • @Toturials
    @Toturials 5 ปีที่แล้ว

    i love your videos

  • @redox2596
    @redox2596 5 ปีที่แล้ว

    Thanks!

  • @ralfjones3151
    @ralfjones3151 5 ปีที่แล้ว

    Thanks

  • @juulghot50nic2
    @juulghot50nic2 5 ปีที่แล้ว

    juul

  • @gf8472
    @gf8472 4 ปีที่แล้ว

    iSum:=iSum+1.......Inc(iSum) better, isn't it ?