Forms em abas, probleminha

Delphi

06/04/2006

Olá pessoal, estou usando uma função fornecida pelo amigo Michael, muita boa por sinal.. funciona perfeitamente... mas estou tendo um probleminha de tremida na tela... ou seja, quand eu maximizo, ou redimensiono a tela, o form que está dentro do TabSheet fica tremendo... parece que tá com parkinson... existe alguma forma de isso não acontecer? Aproveitando, alguém conhece algum Tab com botãozinho de fechar?

Segue o codigo:
function GetFormTabSheet(FormClass: TFormClass): TTabSheet;
var
 I: Integer;
begin
 Result := nil;
 with FrmPrincipal.PgCtrlPrincipal do
  for I := 0 to PageCount - 1 do
   if Pages[I].Components[0].ClassType = FormClass then
   begin
    Result := Pages[I];
    Break;
   end;
end;



procedure CreateNewForm(_Tab: TJvPageControl; FormClass: TFormClass; _Caption: string; const _ImgIdx: integer = 0; const NaoDupForm: Boolean = False);
var
 TabSheet: TTabSheet;
 TabObj: TComponent;
begin

 if NaoDupForm then
 begin
  TabObj := GetFormTabSheet(FormClass);
  if Assigned(TabObj) then
  begin
   _Tab.ActivePage := TabObj as TTabSheet;
   Exit;
  end;
 end;

 TabSheet := TTabSheet.Create(_Tab);
 TabSheet.PageControl := _Tab;


 with FormClass.Create(TabSheet) do
 begin
  Align := alClient;
  BorderStyle := bsNone;
  Parent := TabSheet;
  if Empty(_Caption) then
   TabSheet.Caption := Caption
  else
   TabSheet.Caption := _Caption;
  TabSheet.ImageIndex := _ImgIdx;
  Show;
 end;


 _Tab.ActivePage := TabSheet;
 FrmPrincipal.ActBarClose.Update;
end;


Acredito não ser problema no codigo, e sim algo nos proprios Forms.

Desde já agradeço a todos.


Titanius

Titanius

Curtidas 0
POSTAR