ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Width Property missing from Listview (mscomctl.dll) in VB6 (https://www.excelbanter.com/excel-programming/302831-width-property-missing-listview-mscomctl-dll-vb6.html)

Eric Hofer

Width Property missing from Listview (mscomctl.dll) in VB6
 
Has anybody ever experienced referencing the listview and then not
being able to access the width property? Any thoughts what might be
the cause.

Using the Object Browser, width is not shown for ListView.

Also, myListview.name causes an error though if the mouse hovers, it
shows the name of the element.

Jamie Collins

Width Property missing from Listview (mscomctl.dll) in VB6
 
(Eric Hofer) wrote ...

Has anybody ever experienced referencing the listview and then not
being able to access the width property? Any thoughts what might be
the cause.

Using the Object Browser, width is not shown for ListView.

Also, myListview.name causes an error though if the mouse hovers, it
shows the name of the element.


Have you noticed, for the MSForms library in the Object Browser that
e.g. the ComboBox has no Width nor Name property but the object called
'Control' does? The following works for me:

Private Sub UserForm_Activate()
Debug.Print ListView1.Name, ListView1.Width
End Sub

Jamie.

--

Eric Hofer

Width Property missing from Listview (mscomctl.dll) in VB6
 
Interesting. I cannot get the same to work.

Instead I get "Compile error: method or data member not found".

I worked round this by finding the related control in the generic
controls.

'WORKAROUND as WIDTH isn't working
For i = 0 To Me.Controls.Count - 1
If lvwTarget Is Me.Controls(i) Then
vRemWidth = Me.Controls(i).Width
Exit For
End If
Next i



*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT +1. The time now is 09:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com