<< Click to Display Table of Contents >> Navigation: Notes for Upgraders > ... when upgrading from WPTools 4 > Changed GUI elements |
TWPToolCtrol
In WPTools 4 the control TWPToolCtrol was used to create the link between a TWPComboBox and the editor.
This class is not supported anymore since it was not compatible to modern 3rd party toolbar controls. This means that it is not possible to use any TPanel as a toolbar by simply dropping a TWPToolCtrl on its surface. We recommend to use the TWPToolPanel instead.
The best approach is to use the wptools standard actions to link to buttons and menu items and the new TWPToolsCustomEditContolAction. The latter class can be also added to any TActionList and is used to create a link to the TWPComboBox class. (property AttachedControl)
Please read more about actions and Use WPTools5 with TBX (Toolbar2000 Extension)
TWPEdit
The component TWPEdit (the single line RTF object) is not available anymore.
You can use a standard TWPRichText and set certain properties to replace it.
object WPRichText1: TWPRichText
LayoutMode = wplayNormal
ScrollBars = ssNone
EditOptions = [wpActivateUndo, wpActivateUndoHotkey, wpNoVertScrolling]
XOffset = 15
Width = 300
Height = 22
end
Now add an event handler for OnKeyDown to suppress the Return key:
procedure TForm1.WPRichText1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key = VK_RETURN then key := 0;
end;