Gambas France BETA


Pas de compte ? Incription

Reparent

À propos de ce code

Un exemple d'utilisation de la commande reparent (re-parent, redéfinition du parent d'un objet)

Code source

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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
' Gambas class file

PUBLIC SUB Form_Open()

ME.Center

END

PUBLIC SUB Button7_Click()

ME.Close

END

PUBLIC SUB Frame1_Enter()

PictureBox1.Reparent(Frame1, 0, 0)

END

PUBLIC SUB Panel1_Enter()

PictureBox1.Reparent(Panel1, 0, 0)

END

PUBLIC SUB TabStrip1_Enter()

PictureBox1.Reparent(TabStrip1, 0, 0)

END

PUBLIC SUB TabStrip1_Click()

IF TabStrip1.index = 0 THEN PictureBox1.Reparent(TabStrip1, 0, 0)
IF TabStrip1.index = 1 THEN PictureBox1.Reparent(TabStrip1, 0, 0)

END

PUBLIC SUB VBox1_Enter()

PictureBox1.Reparent(VBox1, 0, 0)

END

PUBLIC SUB HSplit1_Enter()

PictureBox1.Reparent(HSplit1, 0, 0)

END

PUBLIC SUB DrawingArea1_Enter()

PictureBox1.Reparent(DrawingArea1, 0, 0)

END

PUBLIC SUB ScrollArea1_Enter()

PictureBox1.Reparent(ScrollArea1, 0, 0)

END

PUBLIC SUB Panel2_Enter()

PictureBox1.Reparent(Panel2, 0, 0)

END

Commentaires