Anchoring under VS2005

S

Simon Hart

Is anyone else finding the Anchoring under CF 2 a bit flakey? with lots of
little "funnies"?

I am finding it works in all cases when designing screens under VGA mode
except tab controls. They do not anchor to the right of the form.

The controls that do Anchor correctly under VGA, as soon as you switch to
QVGA they don't work correctly. I am finding in this case, sometimes they do
anchor but other times they don't.

Some cases I am finding the Right anchor not working but the bottom does
then in some other cases finding the right works but the bottom doesn't!

I am finding tab controls are the worst, most other cases just dropping a
control on a form seems to work 99% of the time. I do however have a label
that just doesn't want to Anchor to the right! You can see this when
switching to landscape mode.

I guess I will need to go back to trusty old code in the Resize event.

With all that said I am finding the Dock property to work in all cases.

Cheers
Simon.
 
S

Simon Hart

For future reference...I have figured this out.

It seems if you have a container control such as a Tab control etc and you
set the Anchor properties to Top,Left,Right,Bottom and you design your
screen in VGA mode. You also override the Resize event to handle when the
Sip is shown/hidden so you can resize the Tab to accomondate the SIP. It
seems this is only effected on QVGA devices, but if you change the size of
the tab control before the Window is fully initialized the display of the
Anchored control is not calculated correctly. The control at this point is
then partly drawn off screen.
I found the workaround is to test if the Window was visible or not in the
Resize event, if so, then go ahead and resize the tab. Not sure why this is,
I tried calling ResumeLayout after the resize but still didn't work.

It has taken me all afternoon to figure this out!

Cheers
Simon.

You then switch back to QVGA to test it the the controls within the
container are
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top