Telegram_2020-02-10T04

<< Click to Display Table of Contents >>

Navigation:  Telegram > 2020 > 02 > 10 >

Telegram_2020-02-10T04

Telegram link

 

2020-02-10T04:14:26

 

On the host form, let's say, within the procedure 'FrameSelectionChanged' you will get the selection info from the frame and use it to update the grid.

 

At the time of the host form construction, where you instantiate the frame you assign 'FrameSelectionChanged' to the Frame's property:

 

procedure TComboBoxFrame.ComboBoxXChange(Sender: TObject);

 

begin

 

.

 

// do what ever is needed depending on change in ComboBoxX selection

 

.

 

if Assigned(FOnSelectionChange) then

 

FOnSelectionChange(Sender);

 

end;

 

procedure TComboBoxFrame.ComboBoxYChange(Sender: TObject);

 

begin

 

.

 

// do what ever is needed depending on change in ComboBoxY selection

 

.

 

if Assigned(FOnSelectionChange) then

 

FOnSelectionChange(Sender);

 

end;

 

procedure THostForm.FrameSelectionChanged(Sender: TObject);

 

begin

 

.

 

// update Grid using data from FFrame (see below)

 

.

 

end;

 

procedure THostForm.IWAppFormCreate(Sender: TObject);

 

begin

 

.

 

.

 

.

 

FFrame := TComboBoxFrame.Create(Self);

 

FFrame.OnSelectionChange := FrameSelectionChanged;

 

.

 

.

 

end;