KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

ListView With "Checkboxes" and "Full Row Sele

 
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion
View previous topic :: View next topic  
Author Message
mercury
KiXforms Regular
KiXforms Regular


Joined: 10 Aug 2005
Posts: 50

PostPosted: Wed Dec 14, 2005 5:35 pm    Post subject: ListView With "Checkboxes" and "Full Row Sele Reply with quote

Are all of the following behaviors normal for a ListView control?

*If I create a simple listview with the above options enabled and do a multiselect - Shift/Drag-Click, all item checkboxes will become ticked except the last item selected.
*Likewise if all checkboxes have been ticked and I make a new multiselection all effected items become unticked except the last item.

Ctrl-Click Selections do not exhibit this behavior.

*If a number of items are selected and I tick one of the selected checkboxes all selected items become ticked/unticked. I actually think this one is rather useful.

Mercury

Code:
Break On
$System = CreateObject("Kixforms.System")
If Not $System
   $nul= MessageBox("KiXforms.Net Not Initiated. This Script Will Now Close.","Error",16)
   Quit()
EndIf
$nul = $System.Application.EnableVisualStyles

$Form1 = $System.Form()
$Form1.Left = 0
$Form1.StartPosition = 0  ;FormStartPosition_Manual
$Form1.Size = $System.Size(608,434) ;(Width,Height)
$Form1.Text = "Form1"
$Form1.Top = 0


$ListView1 = $System.ListView()
$ListView1.CheckBoxes = -1  ;True
$ListView1.FullRowSelect = -1  ;True
$ListView1.Left = 130
$ListView1.Top = 100
$ListView1.Width = 304
$ListView1.View = $System.View_Details
$nul = $Form1.Controls.Add($ListView1)

$ListView1Column0 = $ListView1.Columns.Add($System.ColumnHeader("Item Column",100,$System.HorizontalAlignment_Left))
$ListView1Column1 = $ListView1.Columns.Add($System.ColumnHeader("Column A",100,$System.HorizontalAlignment_Center))
$ListView1Column2 = $ListView1.Columns.Add($System.ColumnHeader("Column B",100,$System.HorizontalAlignment_Right))

$ListView1Item00 = $ListView1.Items.Add($System.ListViewItem("Item 1"))
$ListView1Item00.Checked = 0  ;False
$ListView1Item01 = $ListView1.Items.Item(0).SubItems.Add($System.ListViewSubItem("Item 1A"))
$ListView1Item02 = $ListView1.Items.Item(0).SubItems.Add($System.ListViewSubItem("Item 1B"))

$ListView1Item10 = $ListView1.Items.Add($System.ListViewItem("Item 2"))
$ListView1Item10.Checked = 0  ;False
$ListView1Item11 = $ListView1.Items.Item(1).SubItems.Add($System.ListViewSubItem("Item 2A"))
$ListView1Item12 = $ListView1.Items.Item(1).SubItems.Add($System.ListViewSubItem("Item 2B"))

$ListView1Item20 = $ListView1.Items.Add($System.ListViewItem("Item 3"))
$ListView1Item20.Checked = 0  ;False
$ListView1Item21 = $ListView1.Items.Item(2).SubItems.Add($System.ListViewSubItem("Item 3A"))
$ListView1Item22 = $ListView1.Items.Item(2).SubItems.Add($System.ListViewSubItem("Item 3B"))


$Form1.Show  ;Displays the Form



While $Form1.Visible
   $Nul = Execute($Form1.DoEvents())
Loop
Exit 0
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Thu Dec 15, 2005 3:07 am    Post subject: Reply with quote

I tried reproducing what your seeing, but don't think I understand what you mean by "Shift/Drag-Click" ... can you re-phrase what your keying/dragging/clicking in detail ?

If I can repro - will mock this up in Visual Studio to see whether this is normal behavior (for vb.net anyways) .
Back to top
View user's profile Send private message
mercury
KiXforms Regular
KiXforms Regular


Joined: 10 Aug 2005
Posts: 50

PostPosted: Thu Dec 15, 2005 7:36 am    Post subject: Reply with quote

Sorry about that, it was a bit vague.
What I meant was either making a multiple selection by Clicking an item and then Shift-Clicking the end of the range intended or Click-Dragging over the range. Everything gets highlighted as expected but the checkboxes also get activated save for the last item clicked on or dragged over.
Back to top
View user's profile Send private message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Thu Dec 15, 2005 10:51 am    Post subject: Reply with quote

nice!
I rarely test any scripts but I had to see this...


k, I can't see this unchecked thing either...
you have screenrecorder nearby?

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Thu Dec 15, 2005 4:39 pm    Post subject: Reply with quote

I'm not seeing anything unusual either.
Back to top
View user's profile Send private message
mercury
KiXforms Regular
KiXforms Regular


Joined: 10 Aug 2005
Posts: 50

PostPosted: Thu Dec 15, 2005 5:19 pm    Post subject: Reply with quote

Ok, I noticed something. If you select by clicking in the first column all is well. If you select the last item by clicking on the second (i.e. Item 3A)or later columns you see what I was describing.


Select 1.gif
 Description:
Before
 Filesize:  7.31 KB
 Viewed:  24341 Time(s)

Select 1.gif



Select Multi.gif
 Description:
After
 Filesize:  7.32 KB
 Viewed:  24340 Time(s)

Select Multi.gif


Back to top
View user's profile Send private message
Radimus
KiXforms Enthusiast
KiXforms Enthusiast


Joined: 05 Mar 2003
Posts: 157
Location: Tampa, Florida

PostPosted: Thu Dec 15, 2005 6:46 pm    Post subject: Reply with quote

so basically the 'click event' to check the box only happens if you click on the $item, but not the $item.subitem
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
mercury
KiXforms Regular
KiXforms Regular


Joined: 10 Aug 2005
Posts: 50

PostPosted: Fri Dec 16, 2005 7:28 am    Post subject: Reply with quote

The other way around.
Back to top
View user's profile Send private message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Fri Dec 16, 2005 11:45 am    Post subject: Reply with quote

ok, it's exactly close to what radimus said.

the click event does happen but clicking on "column A" instead "Item X" or instead of pressing tab, produces this kinda behaviour.

weird.
wonder if this is .net thing or implementation stuff.
shawn?

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri Dec 16, 2005 12:19 pm    Post subject: Reply with quote

merc, I was able to reproduce this behavior (I think) in pure VB.NET. Did some research and hit upon this thread. Give it a good read and advise as to whether this is same issue:

listview with checkboxes!Urgent

-Shawn
Back to top
View user's profile Send private message
mercury
KiXforms Regular
KiXforms Regular


Joined: 10 Aug 2005
Posts: 50

PostPosted: Fri Dec 16, 2005 2:30 pm    Post subject: Reply with quote

Hi Shawn,

I read the thread and can confirm that it is exactly the same issue.

For the record I'm using .Net 2.0
Back to top
View user's profile Send private message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Fri Dec 16, 2005 2:33 pm    Post subject: Reply with quote

heh...
fixing it was urgently dropped.

anyone care sending a message to MS' vb team about this?

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri Dec 16, 2005 3:35 pm    Post subject: Reply with quote

lol, the first thing I was going to recommend was to use 2.0 ... that thread is funny because it looks to be answered by some MS Development Team, or someone that has hooks into MS. They said

Quote:

We suggest that you set FullRowSelect to False. It is not the best solution, but it should prevent the unexpected check and uncheck behavior.

Thanks for bringing this issue to our attention. We will report the behavior
to our development team.

Dan & Baiju (VB)


Well, that was 3 and 1/2 years ago (lol) - figured the fix would have been seen in 2.0 ... guess not. Good advise from the experts eh ...

Quote:

We suggest that you set FullRowSelect to False.


Reminds me of that old "Doctor my arm hurts when I do that ... Then don't do that" bit ...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group