August 11th, 2008

Multiple control selection tips/tricks/workarounds

In an earlier blog, we mentioned that multiple control selection was returning with VS2008 SP1. We also mentioned that it isn’t a functionally complete feature yet due to time constraints. Rather than waiting till the next release of Visual Studio, we decided to deliver the core functionality in SP1. The plan is to deliver a completed multiple selection feature for the next version of Visual Studio. Until then, we hope that the current implementation will satisfy the core functionality that you require.

In order to help you use the feature, we’ve compiled a list of tips, tricks, and workarounds for multiple control selection:

Selection

· When selecting controls, make sure your mouse isn’t moving between the time you click your mouse and release the button or else the designer will think you are trying to perform a drag on the control and will drop your selection.

· Clicking on the resize controls (circled in red) also causes selection to be lost.

clip_image002

· When selecting a container control, you need to make sure you’re selecting the control and not the contents inside. The easiest way to do this is to select in the container and then hit <ESC> so that the container is actually selected (the entire container should become highlighted as shown below). This only applies if the first control you are selecting is a container control.

clip_image004

· When trying to multi-select a container control or an entire HTML table, click along the border when you see the four way arrow icon.  clip_image006

· When dealing with data view controls that have selectable cells (detailsview and gridview), you might have to enable paging and select the control from the paging row in order to multi-select it.

clip_image008

· If you don’t have anything selected, are holding down control and try to select an html control, then it won’t work. The workaround is to not hold <CTRL> when selecting the primary control if it is an html control.

· Multi-selecting html controls inside an html table doesn’t work currently. ASP.net controls inside html tables can be multi-selected.

Resizing/Alignment

· Alignment only works when using absolute positioning.

· You can’t drag multiple controls but you can drag one and align the rest of the controls to that control.

· Similarly with resizing controls, you can resize one control and make the rest the same size.

· If all you are dragging a single control and notice all your controls are moving then check if the controls are using the same CSS property (and thus when you drag, the CSS style is being changed and all controls are following the style.) To fix this, create a separate style for the control you want to drag around.

Source View

· Multiple control selection isn’t supported by selection controls through the source editor; it is only enabled for the designer.

· If you make a contiguous selection of controls then all those controls will be highlighted in the source view.

clip_image010

· If there’s anything in between the controls (even white space or line breaks) then it will only highlight the primary control in source view.

clip_image012

· If all the controls being highlighted are inside a container and contiguous then the entire container gets highlighted.

Misc

· If you invoke the <New Data Source…> option from the property grid on multiple controls then you will get a dialog for each control.

· The property grid shows a blank component name when multiple controls are selected but there will be properties shown unless there are no common properties for the selected controls.

clip_image014

· The property grid might take a few seconds to update after selecting a control so if a change isn’t working, make sure the property grid is updated.

0 comments

Discussion are closed.