Autor Tema: [BETA] ucListView 3  (Leído 15708 veces)

0 Usuarios y 1 Visitante están viendo este tema.

..::Carlos::..

  • Bytes
  • *
  • Mensajes: 44
  • Reputación: +0/-0
    • Ver Perfil
Re:[BETA] ucListView 3
« Respuesta #15 en: Diciembre 02, 2011, 01:07:57 am »
Raul y como llamaria la funcion ItemFindText?
 Gracias

raul338

  • Terabyte
  • *****
  • Mensajes: 894
  • Reputación: +62/-8
  • xD fan!!!!! xD
    • Ver Perfil
    • Raul's Weblog
Re:[BETA] ucListView 3
« Respuesta #16 en: Diciembre 02, 2011, 09:19:09 am »
De la misma forma que antes :P

Código: (vb) [Seleccionar]
ucListView1.ItemFindText(Texto, Start, cPartial/cWholeWord, Warp)
Start es a partir de que item
cPartial es para si buscar el item que incluya el texto, cWholeWord es que el texto del item sea el texto buscado
Warp es para "empezar otra vez" la lista (en caso de que start no sea -1 o 0)

ackshun

  • Bit
  • Mensajes: 5
  • Reputación: +0/-0
    • Ver Perfil
Re:[BETA] ucListView 3
« Respuesta #17 en: Enero 03, 2012, 12:22:37 pm »
Great control.. showed me somethings I wasn't sure how to do. Here are some issues.

if no manifest file exist
- flicker with progress bars.
- if explorer theme is checked, the font overwrites each other and causes bolder looking font.

coco

  • Administrador
  • Terabyte
  • *****
  • Mensajes: 548
  • Reputación: +63/-3
    • Ver Perfil
Re:[BETA] ucListView 3
« Respuesta #18 en: Febrero 06, 2012, 01:09:46 pm »
Raul, >:@, me explota el VB6 cuando el lv "TIENE FOCO, y LUEGO LO PIERDE" (adentro del FORM, con un boton y un texto...) en una pc con W7 con VB6 nomas instalado... (UAC off).  >:(

PD: Es el IPAO!!!
« última modificación: Febrero 06, 2012, 01:11:47 pm por coco »
'-     coco
(No me cabe: Java, Python ni Pascal)
SQLite - PIC 16F y 18F - ARM STM32 - ESP32 - Linux Embebido - VB6 - Electronica - Sonido y Ambientacion

ackshun

  • Bit
  • Mensajes: 5
  • Reputación: +0/-0
    • Ver Perfil
Re:[BETA] ucListView 3
« Respuesta #19 en: Febrero 08, 2012, 09:01:34 pm »
is there anyway to hide a column besides setting it to 0?

jonney

  • Bit
  • Mensajes: 5
  • Reputación: +0/-0
    • Ver Perfil
Re:[BETA] ucListView 3
« Respuesta #20 en: Abril 04, 2012, 01:07:07 am »
De la misma forma que antes :P

Código: (vb) [Seleccionar]
ucListView1.ItemFindText(Texto, Start, cPartial/cWholeWord, Warp)
Start es a partir de que item
cPartial es para si buscar el item que incluya el texto, cWholeWord es que el texto del item sea el texto buscado
Warp es para "empezar otra vez" la lista (en caso de que start no sea -1 o 0)

1. According to MSDN, the LVS_EX_DOUBLEBUFFER extended style also enables alpha-blended marquee selection on systems where it is supported. But I didn't see Alpha-blended style marqeen box like win7 explorer.

LVS_EX_DOUBLEBUFFER
Version 6.00. Paints via double-buffering, which reduces flicker. This extended style also enables alpha-blended marquee selection on systems where it is supported.

2. How to do multiselection or deselect items or groups by Left mouse down on empty area of an item like marqee selection?


At this moment, I used hard codes to calculate the selection RECT considering the scrollbar position.

The MultiSelection works this way:

    MouseDown
        SetStartPosition
        SetStartScrollbarPosition
        SetIsDragging or MultiSelection Flag
        Capture mouse, so it works if user moves outside the listview
    MouseMove - If IsDragging...
       SelectionAdorner shown?
           (No) if (move distance > threshold) Show SelectionAdorner
           (Yes)
                GetMousePosition
                GetScrollbarPostion
                UpdateAdornerPosition
                UpdateSelection (preview)
                HighlightItems
    MouseUp - If IsDragging...
          UpdateSelection(final)
          Update SelectedItems
          Hide SelectionAdorner
          SetIsDragging to False
          Release mouse
It looks very simple, but there are a number of issues that are required to be solved.
« última modificación: Abril 07, 2012, 12:47:23 am por jonney »

jonney

  • Bit
  • Mensajes: 5
  • Reputación: +0/-0
    • Ver Perfil
Re:[BETA] ucListView 3
« Respuesta #21 en: Abril 07, 2012, 10:25:41 am »
Código: [Seleccionar]
Private Function GetItemRect(hWnd As Long, ByVal Index As Long) As RECT

    GetItemRect.X1 = LVIR_BOUNDS
    Call SendMessage(hWnd, LVM_GETITEMRECT, Index, GetItemRect)

End Function

GetItemRect returns information about the location of a listview item. By default, GetItemRect returns the rectangle. The rectangle returned includes the item’s X and Y position relative to the listview, its width, and its height.
If the item is currently scrolled out of view, the returned coordinates will reflect this. For example, if item 1 is specified, and the top item visible is item 10, then the Y coordinate returned is a negative number.

Reversely, how to get the Row index by giving the rectangle Coordinate?

for example:
  Top visible Row is 10, Listview got Scrollbar
  I use GetItemRect(m_hListview,0) to retrieve the first Row #0's rectangle, it returns (0, -303, 450, -270 ).

  1. My question is how to use API to determine (0, -303, 450, -270 ) is Row #0?

  2. I want to determine (0,-290,450,-298) is in which of Row (apparently, it is in ROW 0).
 
       
« última modificación: Abril 07, 2012, 11:07:56 am por jonney »

raul338

  • Terabyte
  • *****
  • Mensajes: 894
  • Reputación: +62/-8
  • xD fan!!!!! xD
    • Ver Perfil
    • Raul's Weblog
Re:[BETA] ucListView 3
« Respuesta #22 en: Abril 07, 2012, 11:10:51 am »
  Top visible Row is 10, Listview got Scrollbar
  I use GetItemRect(m_hListview,0) to retrieve the first Row #0's rectangle, it returns (0, -303, 450, -270 ).
  1. My question is how to use API to determine (0, -303, 450, -270 ) is Row #0?
  2. I want to determine (0,-290,450,-298) is in which of Row (apparently, it is in ROW 0).
You have to use LVM_HITTEST (and similars), maybe with the TopItem and the PageCount

jonney

  • Bit
  • Mensajes: 5
  • Reputación: +0/-0
    • Ver Perfil
Re:[BETA] ucListView 3
« Respuesta #23 en: Abril 07, 2012, 11:18:31 am »
  Top visible Row is 10, Listview got Scrollbar
  I use GetItemRect(m_hListview,0) to retrieve the first Row #0's rectangle, it returns (0, -303, 450, -270 ).
  1. My question is how to use API to determine (0, -303, 450, -270 ) is Row #0?
  2. I want to determine (0,-290,450,-298) is in which of Row (apparently, it is in ROW 0).
You have to use LVM_HITTEST (and similars), maybe with the TopItem and the PageCount

   
Código: [Seleccionar]
Public Function ItemHitTest( _
                            ByVal x As Single, _
                            ByVal y As Single _
                            ) As Long

Dim uLVHI As LVHITTESTINFO

    If (m_hListView) Then

        With uLVHI.pt
            .x = ScaleX(x, UserControl.ScaleMode, vbPixels)
            .y = ScaleY(y, UserControl.ScaleMode, vbPixels)
        End With

        ItemHitTest = SendMessage(m_hListView, LVM_HITTEST, 0, uLVHI)
    End If

End Function
SendMessage  doesn't work because .Pt is always positive value.

on Grouping mode, things get complicated if we use TopItem and the PageCount to determine.
« última modificación: Abril 07, 2012, 11:20:59 am por jonney »

k_arlytos

  • Megabyte
  • ***
  • Mensajes: 211
  • Reputación: +2/-4
    • Ver Perfil
Re:[BETA] ucListView 3
« Respuesta #24 en: Febrero 19, 2014, 01:44:31 pm »
yo uso el otro listview, el del otro post, donde posteaban los fix, no quiero ser pesado pero lamentablemnte no es tan rapido con recordsets como esperaba, el MSHFlexgrid es mas rapido, pero bueno sacrifico 1 o 2 segundos por tener este control ya que es mucho mas lindo que el MSHFlexgrid. pero con bucles sin recordset es rapidisimo.

saludos.

y cual es el otro uclistview mas rapido podrias pasarme el link?
"Comentar el código es como limpiar el cuarto de baño; nadie quiere hacerlo, pero el resultado es siempre una experiencia más agradable para uno mismo y sus invitados"

igor

  • Bit
  • Mensajes: 9
  • Reputación: +1/-0
    • Ver Perfil
    • incod.ru
Re:[BETA] ucListView 3
« Respuesta #25 en: Abril 15, 2014, 05:41:34 pm »
Иногда возникает ошибка в Function pvSortingCallback.
Ошибка сортировки неправильный тип.
Возможно нужно исправить на это

A veces, hay un error en el pvSortingCallback Funcion.
Error de clasificacion del tipo equivocado.
Tal vez usted necesita para arreglarlo

Sometimes there is an error in the Function pvSortingCallback.
Error sorting the wrong type. Maybe you need to fix it
Código: [Seleccionar]
Case eSortTypeConstants.stNumeric: val1 = Val(val1): val2 = Val(val2)
'=================================================
И здесь возвращается строка из 256 символов
Y aqui se vuelve una cadena de 256 caracteres
And here it returns a string of 256 characters
Código: [Seleccionar]
Public Property Get ColumnText(ByVal Column As Long) As String
If m_hListView = 0 Or m_hHeader = 0 Then Exit Property
    Dim uLVC  As LVCOLUMN
    Dim a     As String
    With uLVC
        [b]a = String$(255, Chr(0))[/b]
        .pszText = StrPtr(a)
        .cchTextMax = Len(a)
        .mask = LVCF_TEXT
    End With
    Call SendMessage(m_hListView, LVM_GETCOLUMN, Column, uLVC)
   
    'Correccion исправление
    ColumnText = Left$(a, InStr(2, a, Chr(0), vbBinaryCompare) - 1) ' <<<<<<
   
End Property
El programa de control de brillo del monitor http://incod.ru/win/mymonic/