I'm using C# and Visio 2010. When moving a shape from one list container to another on the same page, I have (in the past) successfully used the technique of just removing the shape from one container and adding to the other like so:
fromContainer.ContainerProperties.RemoveMember(shapeToMove);
toContainer.ContainerProperties.AddMember(shapeToMove, IVisio.VisMemberAddOptions.visMemberAddUseResizeSetting);
toContainer.ContainerProperties.InsertListMember(shapeToMove, positionInContainer); // position will always be 1 in this case
Now I am running into some strange behavior where it's not quite working. Wondering if anyone knows what this might mean.
I'll need to provide a little context in order to explain this. The basic idea is that we are working with paragraph shapes inside of column shapes, and trying to handle wrapping if things start going off the page. So if a paragraph gets inserted into a column shape which then makes the column too long for the page, we want to move the bottom paragraph to the top of the next column.
What I'm seeing is that if I drag the new paragraph to the bottom of the column, thereby making it too long, it works perfectly – moves to the top of the next column immediately.
However, if I drag the new paragraph to any other position of the column, here's what I see (see screenshot): The bottom shape from first column didn't move, but it has clearly been successfully removed from its original container. (The container has shrunk to no longer contain it). If I click on the paragraph shape, it does have an anchor point over to position 1 of the next column, and the column 2 container highlights, so it is in that container, and it has allocated the correct amount of space at that position to accommodate the paragraph shape, but it just didn't actually pull it over. If I click on that shape and move it the tiniest bit, on release Visio then pulls it over where it's supposed to be. Or if I delete some other paragraph from column 2 is also triggers that paragraph to get pulled over.
Any ideas???
It seems to me, here acting the same limit on the length of the chain, as in the garland shapes. That is Visio limits the depth calculation.
It feels like some event in Visio isn't firing... but I'm not sure why that would be. As soon as I manually tweak that column a bit, it triggers the refresh. Was looking for some way to maybe force a refresh on that Container, but didn't find anything.
Anyway, I was able to work around the issue by doing a Copy/Paste of the shape and moving the copy into the second container.
But I would still be very interested in understanding what was going on and knowing how to fix the issue.
Thanks in advance.
Browser ID: smf
(is_webkit)
Templates: 1:
Printpage (default).
Sub templates: 4:
init,
print_above,
main,
print_below.
Language files: 1:
index+Modifications.english (default).
Style sheets: 0:
.
Hooks called: 47 (
showintegrate_autoload, cache_get_data, integrate_pre_load, integrate_load_session, integrate_verify_user, cache_get_data, integrate_user_info, integrate_load_board, cache_get_data, integrate_board_info, cache_get_data, integrate_allowed_to_general, integrate_pre_load_theme, cache_get_data, integrate_allowed_to_general, integrate_simple_actions, integrate_allowed_to_general, integrate_load_theme, integrate_pre_log_stats, cache_get_data, integrate_actions, integrate_pre_parsebbc, integrate_bbc_codes, integrate_bbc_print, integrate_post_parsebbc, integrate_pre_parsebbc, integrate_bbc_print, integrate_post_parsebbc, integrate_pre_parsebbc, integrate_bbc_print, integrate_post_parsebbc, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_menu_buttons, integrate_current_action, integrate_theme_context, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general)
Files included: 25 - 925KB. (
show/home/iw0lkfe3x6cq/public_html/vgforum/index.php, /home/iw0lkfe3x6cq/public_html/vgforum/Settings.php, /home/iw0lkfe3x6cq/public_html/vgforum/cache/db_last_error.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/QueryString.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs-Auth.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Errors.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Load.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Security.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs-Compat.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs-Db-mysql.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Cache/CacheApi.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Cache/CacheApiInterface.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Cache/APIs/FileBased.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs-Charset.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Unicode/Metadata.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Unicode/QuickCheck.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Session.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Logging.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Class-BrowserDetect.php, (Current Theme)/languages/index.english.php, (Current Theme)/languages/Modifications.english.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Printpage.php, (Current Theme)/Printpage.template.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Unicode/CaseUpper.php)
Memory used: 775KB.
Tokens:
post-login.
Cache hits: 7: 0.00099s for 22,301 bytes (
showget modSettings: 0.00042s - 19982 bytes, get known_languages: 0.00015s - 1277 bytes, get board_parents-0: 0.00010s - 2 bytes, get permissions:-1: 0.00007s - 50 bytes, get theme_settings-1: 0.00012s - 980 bytes, get log_online-update: 0.00011s - 10 bytes, get menu_buttons--1-english: 0.00001s - 0 bytes)
Cache misses: 1: (
showget menu_buttons--1-english)
Queries used: 9.
[Show Queries]