Bonjour, mes chèrs amis.
comment colorer un pagecontrole avec les tabsheets sans garder les retouche a frontière (bordure).
merci et merci d'avance.
Bonjour, mes chèrs amis.
comment colorer un pagecontrole avec les tabsheets sans garder les retouche a frontière (bordure).
merci et merci d'avance.
Bonjour,
tu peut utiliser l'evenement ondrawtab de TPagecontrol, voici un exemple:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 procedure TForm10.page1DrawTab(Control: TCustomTabControl; TabIndex: Integer; const Rect: TRect; Active: Boolean); begin if (active) then begin // (control as TCustomTabControl).canvas.StretchDraw(rect,form1.image2.Picture.graphic); (control as TCustomTabControl).canvas.Font.color:=clwhite; (control as TCustomTabControl).Canvas.Brush.Color :=clred; (control as TCustomTabControl).Canvas.FrameRect(Rect); (control as TCustomTabControl).Canvas.Brush.Color :=clblack; (control as TCustomTabControl).Canvas.FloodFill(rect.Left+1,rect.Top+1,clred,fsBorder); end else begin /// (control as TCustomTabControl).canvas.StretchDraw(rect,form1.image5.Picture.graphic); (control as TCustomTabControl).canvas.Font.color:=clblack; (control as TCustomTabControl).Canvas.Brush.Color :=clblue; (control as TCustomTabControl).Canvas.FrameRect(Rect); (control as TCustomTabControl).Canvas.Brush.Color :=clwhite; (control as TCustomTabControl).Canvas.FloodFill(rect.Left+1,rect.Top+1,clblue,fsBorder); end; case tabindex of 0:(control as TCustomTabControl).canvas.TextOut(rect.Left+2,rect.Top+2,tab1.Caption); 1:(control as TCustomTabControl).canvas.TextOut(rect.Left+2,rect.Top+2,tab2.Caption); 2:(control as TCustomTabControl).canvas.TextOut(rect.Left+2,rect.Top+2,tab3.Caption); 3:(control as TCustomTabControl).canvas.TextOut(rect.Left+2,rect.Top+2,tab4.Caption); 4:(control as TCustomTabControl).canvas.TextOut(rect.Left+2,rect.Top+2,tab5.Caption); 5:(control as TCustomTabControl).canvas.TextOut(rect.Left+2,rect.Top+2,tab6.Caption); 6:(control as TCustomTabControl).canvas.TextOut(rect.Left+2,rect.Top+2,tab7.Caption); 7:(control as TCustomTabControl).canvas.TextOut(rect.Left+2,rect.Top+2,tab8.Caption); 8:(control as TCustomTabControl).canvas.TextOut(rect.Left+2,rect.Top+2,tab9.Caption); end; end;
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager