Question about 2 or more controls linked to one control.

Please discuss general Delphi programming topics here.

Question about 2 or more controls linked to one control.

Postby Stewart81 » November 16th, 2007, 11:49 pm

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:

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.
Stewart81
Member
Member
 
Posts: 1
Joined: November 16th, 2007, 11:40 pm

Postby Kambiz » November 17th, 2007, 11:55 am

Your comments don't describe the problem. Anyway, your code doesn't look correct.

My question is, what are you going to do?
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 8 guests

cron