|
-
Oct 4th, 2000, 02:01 PM
#1
Thread Starter
Member
I'm modifying another person's code, and I've run into a snag. There is a form with a treeview control. In the design, the treeview control only takes up half the form and there are a few buttons and text boxes on the form.
The problem arrises when I compile it. the treeview expands to the far edges of the form, covering every other object. I've even sized the treeview to 16x16 pixels, it still expands after it is compiled.
I'm sure this is easy to solve, but I'm new to this GUI thing.
Thanks!
-
Oct 4th, 2000, 04:09 PM
#2
Have a look at the Form_Resize event (or Sub if you like). Check for code like:
Code:
Treeview.Width=blah
Treeview.Height=blah
Also possible:
Code:
With Treeview
.Width=blah
.Height=blah
End With
Can't find it?
Have a look at the Form_Load, _Intitialize, _Paint and _Activate Events (subs)...
Still nothing?
Click the Treeview, Find It's name and go to the code of the form. Hit Ctrl-F, Type the name and Click the "Current Project" option. Click Find and check the code.. Keep Hitting F3 until you find something.
Still found nothing?
Close your eyes, move your mouse, click left twice, wait for 3 seconds, right-click and hit Delete (Don't open your eyes yet!). Next hit Enter. Then, Hit Ctrl-Alt-F4, up arrow twice and hit Enter. Put your mouse on it's back, Spin your monitor around 3 times, and open your eyes again. Then check if there are any other replies to this thread 
Enjoy!
-
Oct 4th, 2000, 05:11 PM
#3
Thread Starter
Member
ya know, it's interesting how I found it. The definition for the height is unique to the treeview. The resize code was attached to the treeview's label. If you resized or moved the label (attached to the treeview) the label resized the treeview (The guy who wrote that must not have been bright).
Anyway, for thos interested, the code for resizing a treeview looks like this:
tvwMain.Move 0, 0, frmMain.ScaleWidth, frmMain.ScaleHeight
-
Oct 4th, 2000, 06:28 PM
#4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|