listbox style changes are notified to the widgetset

git-svn-id: trunk@5551 -
This commit is contained in:
vincents 2004-06-10 22:07:58 +00:00
parent 6762936880
commit a8ed94e6e6
5 changed files with 40 additions and 15 deletions

View File

@ -302,6 +302,8 @@ procedure TCustomListBox.SetStyle(Val : TListBoxStyle);
begin
if Val <> FStyle then begin
FStyle:= Val;
if HandleAllocated then
TWSCustomListBoxClass(WidgetSetClass).SetStyle(Self);
end;
end;

View File

@ -208,7 +208,7 @@ Uses
// Win32WSMenus,
// Win32WSPairSplitter,
// Win32WSSpin,
// Win32WSStdCtrls,
Win32WSStdCtrls,
// Win32WSToolwin,
////////////////////////////////////////////////////
Buttons, Calendar, CListBox, Spin, CheckLst, WinExt, LclProc;
@ -253,6 +253,9 @@ End.
{ =============================================================================
$Log$
Revision 1.83 2004/06/10 22:07:58 vincents
listbox style changes are notified to the widgetset
Revision 1.82 2004/06/10 18:14:09 vincents
converted win32proc.inc to unit

View File

@ -33,7 +33,7 @@ uses
// To get as little as posible circles,
// uncomment only when needed for registration
////////////////////////////////////////////////////
// StdCtrls,
StdCtrls,
////////////////////////////////////////////////////
WSStdCtrls, WSLCLClasses;
@ -85,8 +85,9 @@ type
private
protected
public
class procedure SetStyle(const ACustomListBox: TCustomListBox); override;
end;
{ TWin32WSListBox }
TWin32WSListBox = class(TWSListBox)
@ -167,14 +168,6 @@ type
public
end;
{ TWin32WSCheckBox }
TWin32WSCheckBox = class(TWSCheckBox)
private
protected
public
end;
{ TWin32WSToggleBox }
TWin32WSToggleBox = class(TWSToggleBox)
@ -210,6 +203,17 @@ type
implementation
uses
Win32Int, InterfaceBase;
{ TWin32WSCustomListBox }
procedure TWin32WSCustomListBox.SetStyle(const ACustomListBox: TCustomListBox);
begin
// The listbox styles can't be updated, so recreate the listbox
TWin32WidgetSet(InterfaceObject).RecreateWnd(ACustomListBox);
end;
initialization
////////////////////////////////////////////////////
@ -223,7 +227,7 @@ initialization
// RegisterWSComponent(TGroupBox, TWin32WSGroupBox);
// RegisterWSComponent(TCustomComboBox, TWin32WSCustomComboBox);
// RegisterWSComponent(TComboBox, TWin32WSComboBox);
// RegisterWSComponent(TCustomListBox, TWin32WSCustomListBox);
RegisterWSComponent(TCustomListBox, TWin32WSCustomListBox);
// RegisterWSComponent(TListBox, TWin32WSListBox);
// RegisterWSComponent(TCustomEdit, TWin32WSCustomEdit);
// RegisterWSComponent(TCustomMemo, TWin32WSCustomMemo);

View File

@ -1080,6 +1080,10 @@ procedure Register;
implementation
uses
WSStdCtrls; // Widgetset uses circle is allowed
type
TMemoStrings = class(TStrings)
private
@ -1556,6 +1560,9 @@ end.
{ =============================================================================
$Log$
Revision 1.147 2004/06/10 22:07:58 vincents
listbox style changes are notified to the widgetset
Revision 1.146 2004/05/30 14:02:30 mattias
implemented OnChange for TRadioButton, TCheckBox, TToggleBox and some more docking stuff

View File

@ -44,7 +44,7 @@ uses
// To get as little as posible circles,
// uncomment only when needed for registration
////////////////////////////////////////////////////
// StdCtrls,
StdCtrls,
////////////////////////////////////////////////////
WSLCLClasses, WSControls;
@ -77,8 +77,11 @@ type
{ TWSCustomListBox }
TWSCustomListBox = class(TWSWinControl)
public
class procedure SetStyle(const ACustomListBox: TCustomListBox); virtual;
end;
TWSCustomListBoxClass = class of TWSCustomListBox;
{ TWSListBox }
TWSListBox = class(TWSCustomListBox)
@ -152,6 +155,12 @@ type
implementation
{ TWSCustomListBox }
procedure TWSCustomListBox.SetStyle(const ACustomListBox: TCustomListBox);
begin
end;
initialization
////////////////////////////////////////////////////
@ -163,7 +172,7 @@ initialization
// RegisterWSComponent(TGroupBox, TWSGroupBox);
// RegisterWSComponent(TCustomComboBox, TWSCustomComboBox);
// RegisterWSComponent(TComboBox, TWSComboBox);
// RegisterWSComponent(TCustomListBox, TWSCustomListBox);
RegisterWSComponent(TCustomListBox, TWSCustomListBox);
// RegisterWSComponent(TListBox, TWSListBox);
// RegisterWSComponent(TCustomEdit, TWSCustomEdit);
// RegisterWSComponent(TCustomMemo, TWSCustomMemo);