11-12-2012 03:18 PM
Am I missing something or is there no property to control if there are "Moveable Column Seperators" on a Multicolumn Listbox? To be clear I am not looking to programatically control the column width, I want the user to have the ability to move the columns them selves. But I also want to be able to prevent them from being able to move the columns them selves at times. This all stems from using an XControl that during the edit time I want to allow to be able to change the size, but during run-time the size should not be adjustable.
I expected to just find a property to turn that on and off (like Autosize Row Height, or Smooth Scrolling) but couldn't find it.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
11-13-2012 03:38 AM - edited 11-13-2012 03:39 AM
Hi Hooovahh
I can't see a property node to perform that function.
The closest thing I can find is to toggle the 'Column Headers Visible' node which prevents or permits the user from editing the column width by changing the UI slightly. You could also programatically set the width of the columns in a loop during the stage at which you don;t want users to be able to change the width - this should cause them to snap back to the programatically defined width when they try to change them.
Kind Regards
11-15-2012 07:46 AM
The suggestion of hiding column headers isn't going to work in this situation. One thing that would work, is just to add the "Moveable Column Seperators" to the run-time menu. The problem is I don't know the tag associated with that menu option. It is not listed here
http://zone.ni.com/reference/en-XX/help/371361J-01/lvdialog/application_item_tags_scmenus/
What is the tag associated with this command, and will adding it have the desired affect, to allow me to right click and then allow, or don't allow moveable columns?
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
11-15-2012 03:52 PM
You can code that behavior by filtering the "Mouse Down?" event.
11-15-2012 03:54 PM
I must be sounding difficult at this point. But your suggestion will also disable the ability to edit cells, and I believe even to use the scrollbars.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
11-15-2012 04:29 PM
It will only discard the Mouse Down event if it occurs on the headers.
11-16-2012 03:27 AM
Only filtering the headers doesn't help, because you can also move the seperators from inside the table. One ugly hack which might work is to check which cursor is used inside the mouse down event and discard the event if it's the move cursor. I'm not sure if the cursor palette includes a VI for reading the current cursor or if this is something which would need to be done with the OS API.
11-16-2012 08:47 AM
This method may work. There is no "Get Cursor" in the palette, but there was a VI posted here which gets cursor info. Problem for me is it crashes LabVIEW, or just throws exceptions from the GetCursorInfo call. I am in x64 so that may explain it.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
11-17-2012 10:34 AM
11-21-2012 12:28 PM
You can't move the column separators from inside the table when the VI is running, only when it is in edit mode.