Ne cedere ineluctabili possimus | Hallo noucom,
je propose cet exemple:
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
| PUBLIC SUB Form_Open()
WITH ColumnView1 .Add("1", "ligne_1") .Add("2", "ligne_2") .Add("3", "ligne_3") .Add("4", "ligne_4") .Add("5", "ligne_5") .Add("6", "ligne_6") .Add("7", "ligne_7") END WITH
END
PUBLIC SUB ColumnView1_Select() ' Cet événement se produit lorsque vous cliquez sur une ligne de ColumnView
DIM j AS BYTE DIM ob AS OBJECT
' We assign to the variable of type "Object" the "Child" (that is a "GridView") of the "ColumnView": ob = ColumnView1.Children[0] ' We assign the color to the background of the "GridView-Child" and the text in the "ColumnView".: FOR j = 0 TO ob.Rows.Max ob[j, 0].Background = Color.Default ColumnView1[j + 1].Richtext = "<FONT Color=#212121>" & ColumnView1[j + 1].text NEXT ' We assign the blue color to the background of the clicked row: ob[ob.Row, 0].Background = &0000FF ' We assign the yellow color to the text in the clicked line in "ColumnView": ColumnView1[ob.Row + 1].Richtext = "<FONT Color=#FFFF00><B>" & ColumnView1[ob.Row + 1].text END
|
« Vita non suavis esse potest, nec Mors amara. » |