Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

->Height property and->width property

Status
Not open for further replies.

leit0050

Technical User
Sep 4, 2007
29
0
0
US
Hi,
This should be a very basic question. On a groupbox on the form, for example
TGroupBox *GroupBox1;

if I do

someVar = GroupBox1->Height;

I should get the value of the height of the goupbox as drawn on the form, correct? This is confusing me because I'm upgrading a project that uses exactly this syntax. The form height, width, top, and left are all set. However, when I use the debugger, once I get to see that object it is showing all 0's for each of these properties. I don't know if it was a problem with conversion or not. Does anyone have any ideas on this?

I'm considering just copying the old component, pasting, deleting the old, and changing the new ones name. If I do copy and paste, the component shows up proper. Weird

Thankyou
 
According to what I've read, yes, that should work. Why the debugger chokes on it, I don't understand. ClientWidth and ClientHeigth should also show the same thing.



James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
K,
Let me dig into it and see what I come up with. So far, the debugger is doing strange things unless I'm not using it properly (which is a possibility :) ).

 
Hi,
I have confirmed that ->Height and ->Width are indeed the sizes of the windows. My problem is coming from a different location which I will make a new post for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top