Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - BUG: ListView: ListItems disappear
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

BUG: ListView: ListItems disappear

 Post Reply Post Reply
Author
Message
Jean View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post Topic: BUG: ListView: ListItems disappear
    Posted: 30 October 2008 at 12:04pm
ListItems disappear under certain circumstances:

-Open a new project
-put a CommandButton and a ListView on the Form1
-use this code:
Private Sub Form_Load()
  Me.Width = 2175
  Me.Height = 4110

  Command1.Top = 120
  Command1.Height = 375
  Command1.Width = 1815
  Command1.Left = 120

  ListView1.Top = 600
  ListView1.Left = 120

  ListView1.HideSelection = False
  ListView1.View = xtpListViewList

  Dim lngItem As Long
  For lngItem = 1 To 16
    ListView1.ListItems.Add , CStr(lngItem), String(lngItem, Chr(lngItem + 74))
  Next
  ListView1.Arrange = xtpListViewArrangeAutoTop
End Sub

Private Sub Form_Resize()
  On Error Resume Next
  ListView1.Height = Me.ScaleHeight - 700
  ListView1.Width = Me.ScaleWidth - 240
End Sub

Private Sub Command1_Click()
  On Error Resume Next
  Dim Item As XtremeSuiteControls.ListViewItem
  For Each Item In ListView1.ListItems
    If Item.Key = "14" Then
      Item.Selected = True
      Exit For
    End If
  Next

  ListView1.SelectedItem.EnsureVisible
End Sub


-start the application and press the button
-Item with key 14 is selected and visible: Good! 
-now increase the height of the form
-ListItems disappear and there's no scrollbar

This can happen also if you resize the Form/ListView by code!
Don't I use the ListView as intended?


Another curious behavoir is that the HideSelection-Property is obviously reset if you chance the View-Property. You can check this if you change the order of the two lines in the sample code above.
Product: Xtreme SuitePro (ActiveX) Version 15.0.2
Platform: Windows XP (32bit) German - SP 2
Language: VB6 / C# 4.0
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 30 October 2008 at 1:07pm
Can't reproduce in 12.1 Beta, so maybe it is fixed?
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 30 October 2008 at 2:27pm
Hi,
 
I can reproduce it as well. I tried with V12.0.2 and V12.1.0 Beta and both behave the same.
 
Just click command button and resize form height (list items will be arranged) and eventually will disappear including the scrollbar. As long as the selected item is NOT visible this behaviour will be produced every single time.
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 30 October 2008 at 2:46pm
You're right Aaron & Jean, I see the bug now...
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 30 October 2008 at 2:49pm
It looks like you can put ListView1.SelectedItem.EnsureVisible in your Form_Resize event as a workaround (assuming you don't mind the selected item be key visible on resize....this may be a problem in certain situations, so obviously a fix would be the best solution).


Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Jean View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post Posted: 03 November 2008 at 1:31am
Will there be a bug fix?
Product: Xtreme SuitePro (ActiveX) Version 15.0.2
Platform: Windows XP (32bit) German - SP 2
Language: VB6 / C# 4.0
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 03 November 2008 at 1:49am

Hello,

Unfortunatelly we can't fix bugs that inside Microsoft code. ListView is based on standard ListView OS control - you can see same problem with ListView from MS controls.
Use EnsureVisible workaround.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.