I'm using TWPToolbar with selHyperlink. When I press the button I get an InsertHyperlink-dialog. After I enter the url and close the dialog the Hyperlink-button stays down!!! Shouldn't the button be up? When I want to insert a next hyperlink I have to click the button twice. Is this a bug?
Another question: can I replace the default inserthyperlink-dialog with my own? Maybe there should be an event (link OnInsertHyperlink). When it's assigned it replaces the default dialog.
The TWPToolBar triggers an event OnIconSelectionfor all clicks. Here You can interrupt the process and call Your own code. This is what happens:
if Assigned(FOnIconSelection) then
FOnIconSelection(Self, typ, str, group, num, index);
if Assigned(FRtfEdit) and (Typ <> wptNone) then
begin
Windows.SetFocus(FRTFEdit.Handle);
DoToolBarIconSelection(group, num);
FRtfEdit.OnToolBarIconSelection(Sender, typ, str, group, num,
index);
end
;
So please check out the procedure OnToolBarIconSelection in WPCtrRich.pas as example what to do inside the event.
Julian
#2♥ 0
This category is archived. No new posts are possible.