Hi guys, here is my latest hobby, it is a multipurpose usercontrol, it fulfills the function of a list and tries to fulfill the function of almost everything that is a simple list, ListBox, ComboBox, Menu, Dropdown List, Autocomplete Textbox, The The novelty is that it adds several extras and aesthetic changes, such as rounded edges, shadows, custom items, support for Png and standard images, rounded corners and color changes can be applied to the images in the case of vector images (PNG), item groups, separator bars, filter and subtext. Perhaps it is necessary to correct or add things, whoever is interested can leave their comment or suggestion
Last edited by LeandroA; Jul 7th, 2021 at 08:10 PM.
I only saw one problem at the moment.
in the DragDrop.
When you move the items to list2 and the red arrow appears, it does not respect that position, it always places it at the end.
Hello Leandro
First of all, thank you for your fabulous controls that I use regularly.
I have just discovered two small bugs in a very particular case with the ucList control used as a floating list:
This happens in a 2 screen configuration, when the second is to the left of the main screen.
If the application is on screen 2, the coordinates of the containing forms are negative.
In this case the floating list is invariably displayed on screen 1, whether this list is independent or linked to a ucText. I was able to correct this bug by putting in REM the following two lines in the procedure ShowList
Code:
'---
If m_MaxListHeight > 0 Then If WinHeight > m_MaxListHeight Then WinHeight = m_MaxListHeight
If Top + WinHeight > ScreenHeight Then
If BtnTop > 0 Then
m_BtnTop = BtnTop
Top = (m_BtnTop - WinHeight)
Else
Top = (ScreenHeight - WinHeight)
End If
End If
'If Top < 0 Then Top = 0 ' <======================
'----
If Left + (m_ListWidth * DpiFactor) > ScreenWidth Then
If BtnLeft > 0 Then
m_BtnLeft = BtnLeft
Left = BtnLeft - (m_ListWidth * DpiFactor)
Else
Left = ScreenWidth - (m_ListWidth * DpiFactor)
End If
End If
'If Left < 0 Then Left = 0 ' <======================
'----
I haven't found any side effects yet, but I need to continue testing.
The second bug occurs in the same configuration, if we set the ShowFilter property to True and enter text in the search field. The control begins to redraw itself to respond to the number of items found but only displays its frame as visible in the image below (you will recognize your example).
For now I'm struggling to find a solution! Do you have an idea ?
If the application is on screen 1, everything works great!
Hello Leandro
First of all, thank you for your fabulous controls that I use regularly.
I have just discovered two small bugs in a very particular case with the ucList control used as a floating list:
This happens in a 2 screen configuration, when the second is to the left of the main screen.
If the application is on screen 2, the coordinates of the containing forms are negative.
In this case the floating list is invariably displayed on screen 1, whether this list is independent or linked to a ucText. I was able to correct this bug by putting in REM the following two lines in the procedure ShowList
Code:
'---
If m_MaxListHeight > 0 Then If WinHeight > m_MaxListHeight Then WinHeight = m_MaxListHeight
If Top + WinHeight > ScreenHeight Then
If BtnTop > 0 Then
m_BtnTop = BtnTop
Top = (m_BtnTop - WinHeight)
Else
Top = (ScreenHeight - WinHeight)
End If
End If
'If Top < 0 Then Top = 0 ' <======================
'----
If Left + (m_ListWidth * DpiFactor) > ScreenWidth Then
If BtnLeft > 0 Then
m_BtnLeft = BtnLeft
Left = BtnLeft - (m_ListWidth * DpiFactor)
Else
Left = ScreenWidth - (m_ListWidth * DpiFactor)
End If
End If
'If Left < 0 Then Left = 0 ' <======================
'----
I haven't found any side effects yet, but I need to continue testing.
The second bug occurs in the same configuration, if we set the ShowFilter property to True and enter text in the search field. The control begins to redraw itself to respond to the number of items found but only displays its frame as visible in the image below (you will recognize your example).
For now I'm struggling to find a solution! Do you have an idea ?
If the application is on screen 1, everything works great!
Thank you for your help
Sincerely
François
I think there is a problem, if top and left are the coordinates of list in the screen, if you only have one sceen, left property should not be less than 0, if is less than 0 the left side of the list would not be shown, with two screens and the list showing in the screen 1 I don't know what shoud happend.
I Think, you have to control on which screen should the list be displayed to know when this change do.
Your procedures: ucList1_ItemClick and ucList1_ItemCustomDraw in the FrmCustomDraw dialog are completely impossible to adapt to add static entries once, when loading.