Visual Bug : Treeview inside a Tab

  • Thread starter Thread starter Saul
  • Start date Start date
S

Saul

Hi all,

I'm now two weeks into development of my app, and things are largely going
well. Despite some small flaws, this stuff rocks. I think I'm about half
way. When we did this on the Palm platform, it took over 3 months!

Anyway, one thing that I have noticed that is irritating me is this - I have
a tab control, and within the tab area I have a treeview, which fills the
tabs window. Except that it doesn't quite fill it. The largest I can make it
leaves 6 or 7 pixels to the right, and 4 or 5 pixels at the bottom unfilled.
If I try and make it larger, the IDE tells me it's too big and resizes it
back. This is just annoying as I would like to "fill the screen" with the
treeview. I actually have not tried resizing it in code. Perhaps I should
give that a go....

Is anyone else aware of this limitation and/or know away around this? Is
this fixed in the next version?

Thanks in advance,
Saul
 
The view in the designer is not exactly identical as the view during
runtime. Filling a tab entirely with a treeview shows it indeed smaller when
running the application. However, I just tried this and I was able to set
the Size property of the treeview larger during design time without an
"auto" resize by the IDE.

The easiest way to deal with it might indeed be resizing in code. Make sure
not to do this in the designer generated code, but for instance in the
constructor of the form that hosts the tab. This should do the trick:

this.treeView1.Size = tabPage4.ClientRectangle.Size;


--
Regards,

Maarten Struys, eMVP
PTS Software bv

www.opennetcf.org | www.dotnetfordevices.com
 
Maarten,

How much of a legend are you?

That works perfectly, and looks much better..thanks!!

Regards,
Saul
 
Maarten,

How much of a legend are you?

That works perfectly, and looks much better..thanks!!

Regards,
Saul
 
Back
Top