mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 20:36:09 +02:00
- TQtWSCustomPage.SetText implementation
git-svn-id: trunk@11453 -
This commit is contained in:
parent
212f9b4855
commit
fe85f4aebc
@ -350,6 +350,7 @@ type
|
||||
function insertTab(index: Integer; page: QWidgetH; p2: PWideString): Integer;
|
||||
procedure SetTabPosition(ATabPosition: QTabWidgetTabPosition);
|
||||
procedure SignalCurrentChanged(Index: Integer); cdecl;
|
||||
procedure setTabText(index: Integer; p2: PWideString);
|
||||
end;
|
||||
|
||||
{ TQtComboBox }
|
||||
@ -3333,6 +3334,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TQtTabWidget.setTabText(index: Integer; p2: PWideString);
|
||||
begin
|
||||
QTabWidget_setTabText(QTabWidgetH(Widget), index, p2);
|
||||
end;
|
||||
|
||||
|
||||
{ TQtComboBox }
|
||||
|
||||
|
@ -344,10 +344,21 @@ begin
|
||||
AWinControl.Handle := 0;
|
||||
end;
|
||||
|
||||
class procedure TQtWSCustomPage.SetText(const AWinControl: TWinControl;
|
||||
const AText: string);
|
||||
class procedure TQtWSCustomPage.SetText(const AWinControl: TWinControl; const AText: string);
|
||||
var
|
||||
ANoteBook: TCustomNoteBook;
|
||||
Index: Integer;
|
||||
AWsText: WideString;
|
||||
begin
|
||||
inherited SetText(AWinControl, AText);
|
||||
if (AWinControl is TCustomPage) and
|
||||
(AWinControl.Parent <> nil) and
|
||||
(AWinControl.Parent is TCustomNotebook) then
|
||||
begin
|
||||
ANoteBook := TCustomNotebook(AWinControl.Parent);
|
||||
Index := ANoteBook.IndexOf(TCustomPage(AWinControl));
|
||||
AWsText := UTF8Decode(AText);
|
||||
TQtTabWidget(ANoteBook.Handle).setTabText(Index, @AWsText);
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TQtWSCustomNotebook }
|
||||
|
Loading…
Reference in New Issue
Block a user