mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 18:39:52 +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;
|
function insertTab(index: Integer; page: QWidgetH; p2: PWideString): Integer;
|
||||||
procedure SetTabPosition(ATabPosition: QTabWidgetTabPosition);
|
procedure SetTabPosition(ATabPosition: QTabWidgetTabPosition);
|
||||||
procedure SignalCurrentChanged(Index: Integer); cdecl;
|
procedure SignalCurrentChanged(Index: Integer); cdecl;
|
||||||
|
procedure setTabText(index: Integer; p2: PWideString);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TQtComboBox }
|
{ TQtComboBox }
|
||||||
@ -3333,6 +3334,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TQtTabWidget.setTabText(index: Integer; p2: PWideString);
|
||||||
|
begin
|
||||||
|
QTabWidget_setTabText(QTabWidgetH(Widget), index, p2);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TQtComboBox }
|
{ TQtComboBox }
|
||||||
|
|
||||||
|
@ -344,10 +344,21 @@ begin
|
|||||||
AWinControl.Handle := 0;
|
AWinControl.Handle := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TQtWSCustomPage.SetText(const AWinControl: TWinControl;
|
class procedure TQtWSCustomPage.SetText(const AWinControl: TWinControl; const AText: string);
|
||||||
const AText: string);
|
var
|
||||||
|
ANoteBook: TCustomNoteBook;
|
||||||
|
Index: Integer;
|
||||||
|
AWsText: WideString;
|
||||||
begin
|
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;
|
end;
|
||||||
|
|
||||||
{ TQtWSCustomNotebook }
|
{ TQtWSCustomNotebook }
|
||||||
|
Loading…
Reference in New Issue
Block a user