21-02-23, 09:05 PM
مساء الخير عليكم جميعا
كيف يمكنني عمل button اللي في الصورة كيف اجعله فوق الادوات او بالاصح فوق Datagrid او flowlouytpanel
كيف يمكنني عمل button اللي في الصورة كيف اجعله فوق الادوات او بالاصح فوق Datagrid او flowlouytpanel
ButtonX.BringToFront()(23-02-23, 09:01 PM)عبدالكريم برشدان كتب : [ -> ]هذه الخاصية نحجت مع datagridview
بس ما نجحت مع flowloauytpanel
ارفق لك مثال بذلك
هذا المثال
Button1.BringToFront()
Button1.Location = New Point(100, 300)(23-02-23, 11:17 PM)عبدالكريم برشدان كتب : [ -> ]اريد تصنيف وترتيب الاسماء
مثل الصورة
dp.Fill(ds)
dt = ds.Tables.Item(0)
num2 = (dt.Rows.Count - 1)
Me.FlowLayoutPanel1.Controls.Clear()
Dim str1 As String = ""
Dim FirstChar As String = "", Fi1 As String = ""
Do While (i <= num2)
str1 = dt.Rows.Item(i).Item("nam").ToString
FirstChar = Mid(str1, 1, 1)
If (i = 0) Or (FirstChar <> Fi1) Then
Dim uc1 As New UserControl1
uc1.Label1.Text = FirstChar
uc1.Label1.Left = uc1.Width - uc1.Label1.Width - 20
Me.FlowLayoutPanel1.Controls.Add(uc1)
uc1.Label1.Font = New Font(uc1.Label1.Font.Name, uc1.Label1.Font.Size + 2, FontStyle.Bold)
uc1.Label1.ForeColor = Color.WhiteSmoke
uc1.BackColor = Color.LightGray
uc1.Height = uc1.Height * 2 / 3
uc1.Label1.Top = (uc1.Height - uc1.Label1.Height) / 2
Fi1 = FirstChar
End If
Dim uc As New UserControl1
uc.Label1.Text = dt.Rows.Item(i).Item("nam").ToString
' uc.Label1.RightToLeft = RightToLeft
uc.Label1.Left = uc.Width - uc.Label1.Width - 30
Me.FlowLayoutPanel1.Controls.Add(uc)
i += 1
If i = j Then Exit Do
Loop
Button2.Enabled = True
Button3.Enabled = TrueDim dp As New OleDbDataAdapter("Select * From Tbl order by Nam", con)