Autor Beitrag
rmasterb
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 71



BeitragVerfasst: Fr 18.04.03 18:04 
ich hab ein tabsheed dynamisch in ein statisches pagecontrol erstellt.
jetzt habe ich auch schon mit erfolg in den tabsheed neue komponenten integriert

ABER: in einem Tabsheed gibt es kein canvas.handle oder ein handle:HDC dem ich mein canvas.handle zuweisen kann

gibt es eine andere möglichkeit in ein tabsheed zu "malen"??

ps: lösche mal bitte meinem beitrag aus '
rmasterb Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 71



BeitragVerfasst: Fr 18.04.03 18:07 
meinen beitrag aus 'TListView und Canvas' löschen, bitte :oops:
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Sa 19.04.03 12:52 
rmasterb hat folgendes geschrieben:
meinen beitrag aus 'TListView und Canvas' löschen, bitte :oops:

Was soll gelöscht werden?
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: Sa 19.04.03 13:19 
Also du kann dir das HDC mit GetDC holen und dann mit den Windows-Api-Funktionen auf das TabSheet malen. Wenn du das nicht willst, kannste ja auch ein Image auf das TabSheet erstellen und darein malen :wink:

_________________
Viele Grüße
Jakob
FloSch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 129



BeitragVerfasst: Sa 19.04.03 13:24 
Ein einfaches Beispiel:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
var
  hwnd: TCanvas;
begin
  hwnd := TCanvas.Create;
  try
    hwnd.Handle := GetDC(TabSheet1.Handle); // dein tabsheet
    hwnd.Brush.Color := clBlue; // ab hier wird gemalt ;-)
    hwnd.Rectangle(0,0,50,50); 
  finally
    hwnd.Free;
  end;


Grüße
Florian :roll: