troubleshooting Question

runtime components handling

Avatar of Ghitza
Ghitza asked on
Delphi
17 Comments1 Solution404 ViewsLast Modified:
I use the TJVScrollMax a Jedi component. I generate a number of bands inside it at runtime. Inside every Band I must create a number of standard components such as EditBoxes and ComboBoxes, CheckBoxes, labels and buttons. I've done this part with the creation of the components but I am sure I am missing something, since I will describe you next, what I need to happen.
So the user enters the number of bands to be created and then presses a button that begins creating the components and showing them.
Every Band has among other components, a button on it with "Validate" caption. This button will close the currently expanded band and expand the next band in order to allow the user to fill the edits, and comboboxes in the next band.

After the user fills the edits and other components with data on all bands... there is one button on the form which will begin to gather data from all the bands and insert them in a database.
I DO NOT need help with SQL, I only need help with how to handle the runtime created components, let's say... I need that on the final Button onClick event, a Memo should be filled with the data entered in the bands.
I will explain in the code better:
First I will paste the dfm and then the pas file:


object Form1: TForm1
  Left = 343
  Top = 111
  Width = 698
  Height = 651
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Label1: TLabel
    Left = 8
    Top = 4
    Width = 54
    Height = 13
    Caption = 'Nr. Obiecte'
  end
  object Image1: TImage
    Left = 228
    Top = 24
    Width = 15
    Height = 15
    AutoSize = True
    Picture.Data = {
      0B544A76474946496D6167659C0300004749463839610F000F00F700000B4271
      0C4472F7FAFB1B5A8F050E16081520040B10050C131147753C698ED5DFE64E76
      9836658B050E1804070A0D45739FB6C7C6D4DE164B7899B1C5F8F9F9E1E8EE59
      7F9F7A99B30816220305077292AD104674F6F7F7F1F6F805121CA7BCCDE7EDF2
      BECDD9F2F3F3EAEFF2C2D1DC0C4372124876184D790E4574030506275982CCD8
      E2FCFDFDFBFCFC0405070A4271040A0E1A588B0404041C5D94FDFEFE00000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      00000000000000000000000000000000000000000000000000000000002C0000
      00000F000F000008810067081C48B0E00C1908132A445860C0411A1023469440
      23438C871227526C705146C689016838E8F8918684132F68B820995142821710
      5492A438F18505882B6710304953C20B15105BE4F4F8428251091B04041D4AC3
      4400A3002A44144A12C48B07123E48A47A50C447166029A4B8880186590F06CC
      AA8571C0A1C1B7330202003B}
  end
  object jvs: TJvScrollMax
    Left = 8
    Top = 40
    Width = 673
    Height = 441
    ButtonFont.Charset = DEFAULT_CHARSET
    ButtonFont.Color = clWindowText
    ButtonFont.Height = -9
    ButtonFont.Name = 'Small Fonts'
    ButtonFont.Style = []
    AutoHeight = False
    OneExpanded = True
    ParentColor = True
    TabOrder = 0
  end
  object Button1: TButton
    Left = 100
    Top = 12
    Width = 119
    Height = 25
    Caption = 'Genereaza obiecte'
    TabOrder = 1
    OnClick = Button1Click
  end
  object Edit1: TEdit
    Left = 8
    Top = 16
    Width = 89
    Height = 21
    TabOrder = 2
    Text = '4'
  end
  object Button2: TButton
    Left = 580
    Top = 488
    Width = 101
    Height = 25
    Caption = 'Analyze'
    TabOrder = 3
  end
  object Memo1: TMemo
    Left = 8
    Top = 516
    Width = 673
    Height = 101
    Lines.Strings = (
      'Memo1')
    TabOrder = 4
  end
end
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 17 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 17 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros