General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › Shift+Left key behaviour in table
-
wongsk27 July 1, 2013 at 6:53 am
Shift+Left key behaviour in table
July 1, 2013 at 6:53 amParticipants 2Replies 3Last Activity 9 years, 7 months agoDear Sir/Madam,
Does any body know how to change the Shift+Left key behaviour in table cell? I check the menu of XMetaL, at the moment, Shift+Left key is used as “Extend selected cell block by one cell to the left “, which is not what i want, I would like to use Shift+Left key to extend the selection one character to the left as the same as in the normal content.
-Brian
Derek Read July 2, 2013 at 5:39 pm
Reply to: Shift+Left key behaviour in table
July 2, 2013 at 5:39 pmIf your table cell contains text then this shortcut does what you want. However, as soon as you reach the container element that represents the cell (td or entry depending on table type) then the cell is selected. This is the same as for any other element.
The macro to try to change this behaviour would be the following but it will just implement the behaviour already in place:
Selection.MoveLeft(sqExtend);
]]>If you take the table rendering away and think about how XMetaL functions with other elements, what you are seeing is the equivalent of using Shift+Left on the following (or any other elements):
some text
some more| text
Assume the | is your cursor. You hold down Shift+Left arrow enough times to select the text “some more”. When you press Shift+Left arrow again the elements will be selected (first one then the previous one). That is just how XMetaL functions. There is no support for “discontiguous selections” (ie: selecting portions of two different elements without selecting both elements in their entirety) unless you are working in Plain Text view where there is no DOM.
Tables add some complexity to this because people are used to working with them in products like Excel so there is some special support for selections in tables that you cannot do in other types of content, including selecting table cells that are one above another or a “column” (which do not exist as a structure in the two main table models).
If you do not need to represent this [u]visually[/u] to your end users you might be able to create something using Ranges instead. You can have multiple Ranges in a document (and they are invisible) but you can only have one Selection.
wongsk27 July 17, 2013 at 12:52 am
Reply to: Shift+Left key behaviour in table
July 17, 2013 at 12:52 amThanks for the reply, Derek. I understand that when there is content inside the table cell, it will select the character on the left of the cursor, however, I discovered it only works in tag on view. If I am in the normal view, and I press shift + Left arrow, the application select the whole table cell instead of the character on the left of the cursor. The application seems to perform different action between tag on view and normal view. I only have problem with normal view, but not tag on view. Is this a bug?
Brian
Derek Read July 17, 2013 at 6:48 pm
Reply to: Shift+Left key behaviour in table
July 17, 2013 at 6:48 pmThat's not normal and I cannot reproduce it here.
Perhaps you could send a sample file and exact instructions as to where your cursor is starting when you begin your selection.
-
AuthorPosts
- You must be logged in to reply to this topic.