Autor Beitrag
FriFra
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Mo 07.07.03 13:25 
Ich hab das Thema zwar schonmal angesprochen, aber ich hoffe immernoch, das vielleicht Doch jemand eine Lösung hat...

Wenn man unter Windows XP (Luna) die Captions einzelner Tabsheets eines PageControl zur Laufzeit ändert, so rutschen diese z.T. hinter die verwendeten TabImages! Im ClassicStyle, sowie unter Win9.x, NT und 2000 tritt das Problem nicht auf...

_________________
Michael
(principal certified lotus professional - developer)
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Di 08.07.03 11:13 
definier bitte zum Teil etwas genauer, damit kann man nichts anfangen!

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
foxy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 814

Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
BeitragVerfasst: Di 08.07.03 11:16 
hat er doch geamcht ...

FriFra meinst du unter xp als OS ? oder das du ne xp kombo benutzt ... da du von win 98 nt stil redest .... das müssteste noch sagen

wenn due ne kombo benutzt hängt das an ihr ...

_________________
"Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)
FriFra Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Di 08.07.03 11:19 
patrick hat folgendes geschrieben:
definier bitte zum Teil etwas genauer, damit kann man nichts anfangen!


z.T. bedeutet, dass es nicht 100% reproduzierbar ist...

Hier ist mal ein Beispiel:
user defined image

_________________
Michael
(principal certified lotus professional - developer)
FriFra Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Di 08.07.03 11:20 
foxy hat folgendes geschrieben:
hat er doch geamcht ...

FriFra meinst du unter xp als OS ? oder das du ne xp kombo benutzt ... da du von win 98 nt stil redest .... das müssteste noch sagen

wenn due ne kombo benutzt hängt das an ihr ...


Natürlich meine ich XP als OS...

_________________
Michael
(principal certified lotus professional - developer)
foxy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 814

Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
BeitragVerfasst: Di 08.07.03 11:36 
ok sry weis ich nich code sehr selten unter xp

_________________
"Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)
FriFra Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Di 08.07.03 11:54 
foxy hat folgendes geschrieben:
ok sry weis ich nich code sehr selten unter xp


Das hat ja damit auch nicht direkt etwas zu tun... ich kann das ganze auch unter Win9x compilieren... nur wenn das Programm unter XP ausgeführt wird tritt der Fehler auf.

_________________
Michael
(principal certified lotus professional - developer)
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Di 08.07.03 11:57 
zeichne den caption doch selbst, vileicht liegt da das problem:)

_________________
MFG
Michael Springwald, "kann kein englisch...."
FriFra Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Di 08.07.03 12:04 
mimi hat folgendes geschrieben:
zeichne den caption doch selbst, vileicht liegt da das problem:)


TPageControl verfügt aber nicht über entspr. Ereignisse (z.B. OnCustomDraw)... also ist's wohl nichtz mit selber zeichnen...

_________________
Michael
(principal certified lotus professional - developer)
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Di 08.07.03 12:13 
hä ?
habe ich mal gemacht.
OnDrawTab
wie wäres damit ?

_________________
MFG
Michael Springwald, "kann kein englisch...."
FriFra Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Di 08.07.03 13:21 
:oops: Ups... da hatte ich was übersehen...

Ich verwende jetzt verwende ich folgenden Code:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
procedure TMain.PageControl1DrawTab(Control: TCustomTabControl;
  TabIndex: Integer; const Rect: TRect; Active: Boolean);
  function RemoveAmp(Wert: string): string;
  begin
    Result := Wert;
    while pos('&', Result) > 0 do
      Result := copy(Result, 1, pos('&', Result) - 1) + copy(Result, pos('&',
        Result) + 1, Length(Result));
  end;
var
  MyLeft, MyTop: integer;
  bmp: TBitmap;
  Tmp: string;
begin
  try
    bmp := TBitmap.Create;
    { Icon zeichnen }
    MyLeft := Rect.Left + 2;
    MyTop := Rect.Top + ((Rect.Bottom + 1) div 2) - 8;
    (Control as TPageControl).Images.GetBitmap((Control as
      TPageControl).Pages[TabIndex].ImageIndex, bmp);
    Control.Canvas.Draw(MyLeft, MyTop, bmp);
    { Text zeichnen }
    MyLeft := Rect.Left + 20;
    MyTop := Rect.Top + ((Rect.Bottom + 1) div 2) -
      (Control.Canvas.TextHeight('T') div 2);
    Control.Canvas.TextOut(MyLeft, MyTop,
      RemoveAmp((Control as TPageControl).Pages[TabIndex].Caption));
    { ShortCuts einfügen }
    Tmp := (Control as TPageControl).Pages[TabIndex].Caption;
    while pos('&', Tmp) > 0 do
    begin
      MyLeft := MyLeft + Control.Canvas.TextWidth(copy(Tmp, 1, pos('&', Tmp) -
        1));
      Control.Canvas.Font.Style := [fsUnderline];
      Control.Canvas.TextOut(MyLeft, MyTop, copy(Tmp, pos('&', Tmp) + 1, 1));
      Control.Canvas.Font.Style := [];
      Tmp := copy(Tmp, pos('&', Tmp) + 1, Length(Tmp));
    end;
  finally
    bmp.Free;
  end;
end;


Ich habe allerdings noch 3 Probleme:
1. Wie passe ich die Breite der Tabs an?
2. Wie bekomme ich die Images Transparent?
3. Wie kann ich die Tabs unter XP im XP-style zeichnen (mit OwnerDraw=True ist der XP-Style weg...)

_________________
Michael
(principal certified lotus professional - developer)