mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-23 19:26:07 +02:00
added TWidgetSet.AppSetTitle, implemented for TWin32WidgetSet (fixes issue #1758)
git-svn-id: trunk@8804 -
This commit is contained in:
parent
a5087728ff
commit
3c90c0bcc8
@ -481,7 +481,7 @@ end;
|
||||
procedure TApplication.SetTitle(const AValue: String);
|
||||
begin
|
||||
inherited SetTitle(AValue);
|
||||
// ToDo: tell the interface
|
||||
WidgetSet.AppSetTitle(GetTitle);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
@ -42,3 +42,8 @@ begin
|
||||
if Assigned(ALoop) then ALoop;
|
||||
end;
|
||||
|
||||
procedure TWidgetSet.AppSetTitle(const ATitle: string);
|
||||
begin
|
||||
Debugln('TWidgetSet.AppSetTitle not implemented by ', ClassName);
|
||||
end;
|
||||
|
||||
|
@ -66,6 +66,7 @@ type
|
||||
procedure AppTerminate; virtual; abstract;
|
||||
procedure AppMinimize; virtual; abstract;
|
||||
procedure AppBringToFront; virtual; abstract;
|
||||
procedure AppSetTitle(const ATitle: string); virtual;
|
||||
|
||||
function DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor; virtual; abstract;
|
||||
procedure DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor); virtual; abstract;
|
||||
|
@ -182,17 +182,21 @@ Type
|
||||
procedure AppInit(var ScreenInfo: TScreenInfo); override;
|
||||
procedure AppMinimize; override;
|
||||
procedure AppBringToFront; override;
|
||||
procedure AppProcessMessages; override;
|
||||
procedure AppWaitMessage; override;
|
||||
Procedure AppTerminate; Override;
|
||||
procedure AppSetTitle(const ATitle: string); override;
|
||||
|
||||
Function InitHintFont(HintFont: TObject): Boolean; Override;
|
||||
Procedure AttachMenuToWindow(AMenuObject: TComponent); Override;
|
||||
|
||||
procedure DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor); override;
|
||||
function DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor; override;
|
||||
procedure DCRedraw(CanvasHandle: HDC); override;
|
||||
procedure SetDesigning(AComponent: TComponent); override;
|
||||
procedure AppProcessMessages; override;
|
||||
procedure AppWaitMessage; override;
|
||||
Procedure AppTerminate; Override;
|
||||
procedure ShowHide(Sender: TObject);
|
||||
Function InitHintFont(HintFont: TObject): Boolean; Override;
|
||||
Procedure AttachMenuToWindow(AMenuObject: TComponent); Override;
|
||||
|
||||
procedure UpdateThemesActive;
|
||||
procedure ShowHide(Sender: TObject);
|
||||
|
||||
// create and destroy
|
||||
function CreateComponent(Sender : TObject): THandle; override;
|
||||
|
@ -345,7 +345,10 @@ begin
|
||||
end;
|
||||
|
||||
function TWin32ComboBoxStringList.GetComboHeight: integer;
|
||||
var
|
||||
R: TRect;
|
||||
begin
|
||||
FEditHeight := SendMessage(FWin32List, CB_GETITEMHEIGHT, -1, 0);
|
||||
if Count = 0 then
|
||||
begin
|
||||
Result := FEditHeight + FItemHeight + 2;
|
||||
|
@ -395,6 +395,11 @@ Begin
|
||||
Assert(False, 'Trace:TWin32WidgetSet.AppTerminate - Start');
|
||||
End;
|
||||
|
||||
procedure TWin32WidgetSet.AppSetTitle(const ATitle: string);
|
||||
begin
|
||||
Windows.SetWindowText(FAppHandle, PChar(ATitle));
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Function: CreateTimer
|
||||
Params: Interval:
|
||||
|
@ -632,6 +632,7 @@ var
|
||||
StringList: TWin32ComboBoxStringList;
|
||||
begin
|
||||
WinHandle := AWinControl.Handle;
|
||||
SendMessage(WinHandle, CB_SETITEMHEIGHT, -1, Height-6);
|
||||
StringList := TWin32ComboBoxStringList(GetWindowInfo(WinHandle)^.List);
|
||||
if StringList <> nil then
|
||||
Height := StringList.ComboHeight;
|
||||
|
Loading…
Reference in New Issue
Block a user