- TQtWSCustomPage.SetText implementation

git-svn-id: trunk@11453 -
This commit is contained in:
paul 2007-07-10 05:17:16 +00:00
parent 212f9b4855
commit fe85f4aebc
2 changed files with 20 additions and 3 deletions

View File

@ -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 }

View File

@ -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 }