Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You have a couple of things you need to/may want to keep track of here:<br> <br> &bull; Current scroll position<br> &bull; Position of the tapped element (I assume a textbox) when they tapped it<br> <br> Note that the EnabledChanged event for the InputPanel is pretty easy to deal with (I assume you've already done it): check the InputPanel's Enabled state and do a += or -= to the tabcontrol's Height so the InputPanel doesn't cover anything up.<br> <br> My understanding is that your issue is really to determine where the textbox was, because your worst-case scenario is that it will be moved off-screen when the tabcontrol resizes.<br> <br> I believe (not 100% certain) that resizing a tabcontrol will keep the top of the tabcontrol contents visible and you'll have to scroll down to see anything that is now "covered" by the InputPanel.<br> <br> What you'll want to do in the EnabledChanged event is find out the location of the control that was tapped (or the screen coordinate that was tapped - whatever is easiest for you). If it falls within the danger zone of (ClientSize.Height-InputPanel.Bounds.Height,ClientSize.Height), you'll need to adjust your scroll. <br><br> This is half-C#-half-pseudocode but you should be able to see where I'm going with it:<br><br> int yOffset = top y-coordinate of the tapped control;<br> if ( yOffset > ClientSize.Height-inputPanel.Bounds.Height )<br> {<br> &nbsp;&nbsp;&nbsp;int yShift = amount to shift everything up;<br> &nbsp;&nbsp;&nbsp;Point scrollPosition = AutoScrollPosition;<br> &nbsp;&nbsp;&nbsp;scrollPosition.Y = scrollPosition.Y - yShift;<br> &nbsp;&nbsp;&nbsp;AutoScrollPosition = scrollPosition;<br> }<br> <br> What this does, in a nutshell, is checks if your InputPanel is going to cover up the desired control, and if so, scroll up by yShift pixels, where yShift might be the whole height of the inputPanel, or just enough to barely show your control (whatever you want). <br> &bull; .NET CF seems very forgiving about setting invalid scroll rules. If you can only scroll up 10 pixels and you tell it to scroll up 100, it will stop at 10.<br> &bull; Screen coordinate (0,0) is the top left of the visible screen - NOT the form being displayed. You can get tripped up if you assume that (0,0) is the top of your form.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload