Question about 2 or more controls linked to one control.
Ok this may be somewhere online but I haven't found it my guess is it is and I'm just not sure how to phrase it. Basically I am messing around with the DelphiSCI component. The problem I have with it is in and MDI format it's a very poor setup. It's great for SDI but bad for MDI. What I did was create a
new control which loads the highlighters into it. Then the plan was to have it call an event whenever a modification was made to a highlighter. Instead of having it linked to the scintilla control as the default setup is I made it so the scintilla control links to this control.
Basicly what I want to know. I tried having Style Control call an event when it updated itself. How can I detect that event occurring in each scintilla control to update themselves. I figure there must be a way.
I tried this:
This works for the last scintilla control created but none of the others. Thanks for any help you can provide.
new control which loads the highlighters into it. Then the plan was to have it call an event whenever a modification was made to a highlighter. Instead of having it linked to the scintilla control as the default setup is I made it so the scintilla control links to this control.
Basicly what I want to know. I tried having Style Control call an event when it updated itself. How can I detect that event occurring in each scintilla control to update themselves. I figure there must be a way.
I tried this:
- Code: Select all
procedure TScintillaMemo.SetPropFile(const Value: TSciPropFile);
begin
FPropFile := (Value);
SetStyles;
FPropFile.OnUpdateStyles := UpdateStyles;
end;
procedure TScintillaMemo.UpdateStyles(Sender: TObject);
begin
if FPropFile <> nil then begin
SetStyles;
end;
end;
This works for the last scintilla control created but none of the others. Thanks for any help you can provide.