Is it possible to achieve a panorama-like scrolling effect in the pivot? I mean instead of flying items in, scroll them in. Like when you use the panorama control and drag the item in view you can already see the next and previous items, but in the pivot you don't - the current item flies out and the next / prev one flies in.
Why am I trying to do this?
Well, as you probably know you can not programatically set the SelectedIndex on a panorama because Microsoft decided to make that property read-only. I have tried several things to fix that including extending the control and using behaviors - but I didn't succeed so I gave up.
Finally I gave up an chose to use the Pivot control instead and it works just fine, except for the scrolling part, where I'd like to have the scrolling effect from the panorama.
Why am I trying to achieve?
A current page overlay. You know, like in the Android applications screen where you can swipe trough a couple of pages and you can see at the bottom / top of your screen on which page you are on (this is the easy part) and also, when you click on one of those bubbles it scrolls to the corresponding page (that's the hard part - because you can't set the SelectedIndex on the Panorama control).
So, any ideas on how to achieve that scrolling effect in the Pivot control? or maybe got another idea on how to change the SelectedIndex on the Panorama? (changing DefaultItem is not a solution).
Thanks.
This sounds way off from the regular behavior of the Panorama/Pivot control so you might want to have a look at the source code and adapt it: http://phone.codeplex.com/
EDIT
In changeset 80787 the panorama control and the pivot control were removed. So to get the code you need to go back to a changeset from before Oct 29 2012.
Related
How do you guys handle the safe area problem for ListViews with Xamarin.Forms? Just setting the safe area as margin on the whole ListView looks ugly AF. So I search for something like a custom renderer to make the ListView as equal als possible to the UITableView in the iPhone X. My current solution bringt the ViewCells in the correct position but the Seperator is going off screen and the ShortGroup index is behind the Notch in some rotations. Beside from that, my current solution is way to much work to implement it in every project (because I use a CustomViewCell class as Workaround).
So how to implement a custom renderer for this problem? All of my current implementations seems not to work properly. And I guess waiting for Xamarin to fix this is not an option (because MasterDetail pages still not work on iOS SplitView and this was reported back in 2015 and is just ignored by Xamarin...).
Edit: The problem with the ListView in Xamarin.Forms did only occur if the ListView control is not the root of the ContentPage. In my case it is inside a Grid because I want a SearchBar too on this side. In this case the content of the ListView (and the ShortGroup index) gets cut off by the iPhone X rounded corners and the notch. It looks really ugly and I guess it is a very common way to have a SearchBar and a ListView on one side. Here is a repository of a project which has a first workaround (the ShortGroup index still has the problem there and also the separator runs outside of the visible area while it normally would stop before that): https://github.com/Sebastian1989101/OpenGeoDB-App
Vaadin 7.6.2
It appears when you attempt to scroll within a ComboBox, the listing moves a page at a time instead of smoothly scrolling up or down one line at a time, I'd prefer it scroll smoothly one line at a time instead of paging. This possible?
It is not possible with this version of component. But ComboBox have filtering functionality which is useful when you have a lot items in a list.
Probably, solution is to create your own widget.
Problem
I am having problems with my sortable list with several items of various height. The problem occurs when I'm trying to move a larger item to the first or last position (which both have smaller objects). If I succeed currently depends very much on where on the larger item I click and start dragging.
If I want to move the item to the smaller bottom position I must click close to the bottom of the item for it to work, and if I want to drag it to the top position I must click closely to the top. But I want to be able to drag the item by clicking anywhere.
Some additional information
The items cannot be dragged outside the parent and the parent is only as large as it has to be and a scroll appears if it's larger than it's container. So it seems that I cannot drag the larger item past the first(smaller) item if I don't drag it in the top part of the item.
I've been trying to fix this by using cursorAt and using top:0 and another test using bottom:0 But it doesn't seem to make any difference (so I might have misunderstood how to use it). I am currently using tolerance: pointer.
I can bypass the problem of not being able to drag the larger item to the last position by temporary during the sorting increasing the height with the height of the dragged item. But it doesn't always work and its not a very good solution. And the problem of not being able to drag it to the top still appears?
I cannot change the JQuery code as in jquery-sortable-with-containment-parent-and-different-item-heights
Question:
How can I drag a larger item to the top or bottom position while allowing the user to click anywhere on the item?
Thanks for your help!
This might not solve your problem, but I thought I'd share the results of some experimenting I did today. I needed to make a sortable photo gallery with inline-block pictures of varying widths, and found that moving wider photos would be really hard work because the placeholder was smaller than the item I was moving. I ended up using this:
container.sortable({
placeholder: "photo placeholder",
start: function (event, ui) {
ui.placeholder.width(ui.item.width());
}
});
The custom placeholder classes are there to ensure the placeholder isn't hidden by default, and the start event ensures that the placeholder is the same width as the item you're about to move. This worked very well for me, and in your case, substituting height for width might work.
I also tried using containment as you have done, and found that it sometimes makes things much harder depending on the items in the row. Like you have explained, including tolerance: "pointer" helps to alleviate the issues, but if possible, removing containment generally makes the UI more forgiving.
I want to display PDF within iOS application, so far the only way I find is open it in TwebBrowser.
A.It is displaying in "fit to page width" zoom as default
B.There is no "zoom" function
WebBrowser1.Navigate(file://mypdf.pdf')
How to
I want to change the zoom after open the file (My solution encounter q#2)
Make the zoom work (My solution encounter q#3)
Make the gesture as work just like web page
For #1:
I chagne WebBrowser1.height/width in run-time, it will auto scale(zoom?) as "Fit to width".
Yes it works, and vertical scroll bar works with a flaw - it will not bounce back on edge -> you can scroll all the way down..
Neither the horizontal scroll, not reacting at all....
*This is because the pdf is A4, not sure what will happen for a landscape style
For #2:
Beside using button clicks to zoom, I add a gestureManager.
Then add Form1.ongesture just like the "iOS Interactive Gestures - Image Zoom" example.
Yes it works, but same thing - no vertical bounce, no horizontal scroll.
*ScrollBox does not work, it will not work with any thing has a build-in vert/hori scroll bars
For #3
:
I go even further, write control for up/down/left/right
Change WebBrowser1.Position.X/Y and WebBrowser1.height/width to make it looks like "scrolling"
Yes it works... but two custom gesture controls are making it really hard to control
(EventInfo.Distance and EventInfo.X/Y, those 2 controls are kinda overlaping to eachother if you run in iPhone)
The wosrt part is, the WebBrowser1 will be on top of ANY compenment, regardless parent/child structure .
The second worst part is the limitation of margin is hard to code, somehow it can always scroll over the limit.....
I "feel" if changing the zoom on/after open, and make it open with both vert/hori scrool bars visible.
Then the horizontal bar should work -> i only need to deal with zoom -> pretty close to prefect.
Of course the best way is to make it work like a web page, like
WebBrowser1.Navigate('http://www.embarcadero.com/') -> both scrollbars works, zoom work.
but...maybe need service pack N for this?
I appreciate for any ideas or code answers.
This damned monkey is on fire and its always hard to find an answer from it.
An article was posted today on The Hacker's Corner called Getting TWebBrowser on iOS to zoom. It suggests a one-line fix to the FMX.WebBrowser.iOS.pas unit. Does this help?
It was a bug, and fixed in the XE4 update.
Is there a text editor which offers horizontal, rather than vertical, scrolling (showing two pages side by side)?
I currently use TextMate, but would switch to any editor which offers this layout. I'm getting really bored of scrolling up and down, over and over.
I've attached a screenshot of MS Word, which has a side-by-side horizontal scroll view for documents longer than a page.
I want something like that, Any recommendations?
Emacs offers a follow-mode which you might find helpful ( see for instance here http://www.emacswiki.org/emacs/FollowMode).
A short description of how it is used and what it does:
You need to open a buffer in two windows and enter follow-mode using M-x follow-mode. This is actually a bit of a drawback, because you need to learn how to use emacs, if you don't know it already (imho learning how to use emacs is worth spending some time).
After entering follow-mode the second buffer will skip to the place where the first buffer ends, similar to the page-by-page view offered by Microsoft Word. Now if you move the cursor down one line at a time and you leave the first buffer window at the bottom, the cursor will appear at the top of the second. If you move further down and you are at the bottom of the second window, both buffers will scroll simultaneously, the same holds for page-wise scrolling using C-v and M-v.
If your monitor screen is wide enough, you can open a third window to further increase number of lines being displayed.
I have made a screenshot, which shows a text file opened in this mode: Screenshot auf Follow mode
Hmmm, it seems you are looking for layout features which you aren't likely to find in a text editor. Text editors are generally line based and don't understand the concept of pages. Text editors do things like code folding and allow lines to be wrapped or not. That is why text editors scroll in the vertical direction. These factors would affect pagination.
The concept of a page (and being able to lay them out side by side) doesn't really exist unless you are using a presentation manager such as a word processor or a desktop publishing package.
In vim: <Esc>:vsplit will open a second column for the file.
In all fairness, I should warn you that Vim has a steep learning curve, and will force you to wrap your head around new concepts like command mode / edit mode / visual mode. The results are definitely worth it, if you have the time to learn it.
I'm not sure if I know exactly what you want. Does Sublime Text 2's two-column layout with File > New View Into File do what you want?
A change on one side is reflected instantly in the other side, and you can scroll them independently. You can have up to four columns per window.
In LibreOffice Writer, go to View -> Zoom... and set Zoom factor to Fit width and height, and set View layout to Automatic. You can also set the number of columns manually, and if you choose two columns, you can use Book Mode.
With scroll-binding in vim, you can edit two files side by side: scroll-binding in Vim.
Show a text file with two columns in vim: http://vim.wikia.com/wiki/View_text_file_in_two_columns