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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

property visible always false 1

Status
Not open for further replies.

Ravala

Programmer
Jan 28, 2004
88
US
I have small procedure,
Private Sub picData_Resize()
Dim sngHeight As Single
sngHeight = Me.txtName(0).Height * Me.txtName.Count + 100
scbVert.Visible = sngHeight > ScaleHeight
.... some code
End Sub
scbVert is flat scroll bar. It's never getting Visible even when sngHeight > ScaleHeight. What's wromg.

Thanks.
 
Things to investigate
=====================

1 - Change scbVert.Visible = sngHeight > ScaleHeight for (scbVert.Visible = sngHeight > ScaleHeight)

ie add the brackets

2 - Is the event actually firing - place a breakpoint in it and see.

3 - Is the property being reset to false elsewhere? Set up a watch on the Visible property and use the "Break on change" option.

Hope this helps,

mmilan
 
Check out the results of:

MsgBox -1 = 5 > 0

and

MsgBox -1 = (5 > 0)
 
in first case, it is false
in second, it is true.
 
Yes. The point being that brackets make a difference to the outcome, and that this might be the cause of your isue.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top