Results 1 to 40 of 223

Thread: [VB6] ucShellTree - Full-featured Shell Tree UserControl

Hybrid View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,653

    Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl

    Hmm, definitely odd behavior and I'll need to study it more in depth. As a temporary solution, this should override it by detecting the switch into partial when Autocheck = False, then advancing it to cleared. This won't work if ExclusionChecks = True.

    In ShellTreeSubclassProc, go to the handler for TVM_ITEMCHANGEDW, change:

    Code:
                    ElseIf ((nmtvic.uStateNew And TVIS_STATEIMAGEMASK) = &H3000) And (mAutocheck = False) Then
                        DebugAppend "ItemExclude"
                        TVEntries(nmtvic.lParam).Checked = False
                        TVEntries(nmtvic.lParam).Excluded = True
    to

    Code:
                    ElseIf ((nmtvic.uStateNew And TVIS_STATEIMAGEMASK) = &H3000) And (mAutocheck = False) Then
                        DebugAppend "ItemExclude"
                        If mExCheckboxes Then
                            TVEntries(nmtvic.lParam).Checked = False
                            TVEntries(nmtvic.lParam).Excluded = True
                        Else
                            SetTVItemStateImage nmtvic.hItem, tvcsEmpty
                        End If

  2. #2
    Fanatic Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    540

    Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl

    Quote Originally Posted by fafalone View Post
    Code:
                    ElseIf ((nmtvic.uStateNew And TVIS_STATEIMAGEMASK) = &H3000) And (mAutocheck = False) Then
                        DebugAppend "ItemExclude"
                        If mExCheckboxes Then
                            TVEntries(nmtvic.lParam).Checked = False
                            TVEntries(nmtvic.lParam).Excluded = True
                        Else
                            SetTVItemStateImage nmtvic.hItem, tvcsEmpty
                        End If
    Confirmed. These changes resolve the Tri-State-Bug when setting .Checkboxes = True in the code (control properties: Autocheck=false, Checkboxes=false, ExclusionChecks=false)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width