Hi
It's a few years old now, but I have the Sky Software Shell Megapack suite (V8) which contains the two (ActiveX) controls above as well as a drive combo control. I have used these successfully in the past but have run into a problem. The Fileview control has a Public Read-Write Property ColumnWidth which, according to the help file, "Gets/Sets the width of the column in pixels". The VB syntax in the help is:
Public Property ColumnWidth(ByVal ColumnName As String, ByVal ColumnIndex As Long) As Long
? MyFileView.ColumnWidth("Name",0) and ? MyFileView.Object.ColumnWidth("Name",0) both work fine and return 120.
Trying to set the column width as follows
MyFileView.ColumnWidth("Name",0) = 240 gives "Function argument value, type or count is invalid"
and MyFileView.Object.ColumnWidth("Name",0) = 240 gives "Syntax error"
Am I missing something (I have checked and there is no method or event on the control which references ColumnWidth).
Alternatively, can anybody suggest affordable (aka cheap, preferably free) alternatives to these controls which are designed to closely mimic the behaviour of Windows Explorer?
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
It's interesting that the VB syntax has the first column as 0 when VB is a one-based array language. Have you tried a 1 there instead for the 2nd parameter?
On Wed, Jun 1, 2022 at 7:55 PM Paul Newton paul.newton.hudl@gmail.com wrote:
Hi
It's a few years old now, but I have the Sky Software Shell Megapack suite (V8) which contains the two (ActiveX) controls above as well as a drive combo control. I have used these successfully in the past but have run into a problem. The Fileview control has a Public Read-Write Property ColumnWidth which, according to the help file, "Gets/Sets the width of the column in pixels". The VB syntax in the help is:
Public Property ColumnWidth(ByVal ColumnName As String, ByVal ColumnIndex As Long) As Long
? MyFileView.ColumnWidth("Name",0) and ? MyFileView.Object.ColumnWidth("Name",0) both work fine and return 120.
Trying to set the column width as follows
MyFileView.ColumnWidth("Name",0) = 240 gives "Function argument value, type or count is invalid"
and MyFileView.Object.ColumnWidth("Name",0) = 240 gives "Syntax error"
Am I missing something (I have checked and there is no method or event on the control which references ColumnWidth).
Alternatively, can anybody suggest affordable (aka cheap, preferably free) alternatives to these controls which are designed to closely mimic the behaviour of Windows Explorer?
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Thanks for the suggestion Eric but the first column is in fact 0 because the following
? MyFileView.ColumnWidth("Name",0) gives the correct result for the width of the first column Paul
On 02/06/2022 16:59, Eric Selje wrote:
It's interesting that the VB syntax has the first column as 0 when VB is a one-based array language. Have you tried a 1 there instead for the 2nd parameter?
On Wed, Jun 1, 2022 at 7:55 PM Paul Newtonpaul.newton.hudl@gmail.com wrote:
Hi
It's a few years old now, but I have the Sky Software Shell Megapack suite (V8) which contains the two (ActiveX) controls above as well as a drive combo control. I have used these successfully in the past but have run into a problem. The Fileview control has a Public Read-Write Property ColumnWidth which, according to the help file, "Gets/Sets the width of the column in pixels". The VB syntax in the help is:
Public Property ColumnWidth(ByVal ColumnName As String, ByVal ColumnIndex As Long) As Long
? MyFileView.ColumnWidth("Name",0) and ? MyFileView.Object.ColumnWidth("Name",0) both work fine and return 120.
Trying to set the column width as follows
MyFileView.ColumnWidth("Name",0) = 240 gives "Function argument value, type or count is invalid"
and MyFileView.Object.ColumnWidth("Name",0) = 240 gives "Syntax error"
Am I missing something (I have checked and there is no method or event on the control which references ColumnWidth).
Alternatively, can anybody suggest affordable (aka cheap, preferably free) alternatives to these controls which are designed to closely mimic the behaviour of Windows Explorer?
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Have you tried to use the STORE command STORE 240 TO MyFileView.ColumnWidth("Name",0)
It might not work either.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Paul Newton Sent: Thursday, June 02, 2022 12:20 PM To: profoxtech@leafe.com Subject: Re: Problem setting ActiveX control property (Folderview and Fileview controls)
Thanks for the suggestion Eric but the first column is in fact 0 because the following
? MyFileView.ColumnWidth("Name",0) gives the correct result for the width of the first column Paul
On 02/06/2022 16:59, Eric Selje wrote:
It's interesting that the VB syntax has the first column as 0 when VB is a one-based array language. Have you tried a 1 there instead for the 2nd parameter?
On Wed, Jun 1, 2022 at 7:55 PM Paul Newtonpaul.newton.hudl@gmail.com wrote:
Hi
It's a few years old now, but I have the Sky Software Shell Megapack suite (V8) which contains the two (ActiveX) controls above as well as a drive combo control. I have used these successfully in the past but have run into a problem. The Fileview control has a Public Read-Write Property ColumnWidth which, according to the help file, "Gets/Sets the width of the column in pixels". The VB syntax in the help is:
Public Property ColumnWidth(ByVal ColumnName As String, ByVal ColumnIndex As Long) As Long
? MyFileView.ColumnWidth("Name",0) and ? MyFileView.Object.ColumnWidth("Name",0) both work fine and return 120.
Trying to set the column width as follows
MyFileView.ColumnWidth("Name",0) = 240 gives "Function argument value, type or count is invalid"
and MyFileView.Object.ColumnWidth("Name",0) = 240 gives "Syntax error"
Am I missing something (I have checked and there is no method or event on the control which references ColumnWidth).
Alternatively, can anybody suggest affordable (aka cheap, preferably free) alternatives to these controls which are designed to closely mimic the behaviour of Windows Explorer?
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Thanks Tracy
It's worth a try ... I tried ... and still get "Function argument value,type or count is invalid"
Paul
On 02/06/2022 17:39, Tracy Pearson wrote:
Have you tried to use the STORE command STORE 240 TO MyFileView.ColumnWidth("Name",0)
It might not work either.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Paul Newton Sent: Thursday, June 02, 2022 12:20 PM To:profoxtech@leafe.com Subject: Re: Problem setting ActiveX control property (Folderview and Fileview controls)
Thanks for the suggestion Eric but the first column is in fact 0 because the following
? MyFileView.ColumnWidth("Name",0) gives the correct result for the width of the first column Paul
On 02/06/2022 16:59, Eric Selje wrote:
It's interesting that the VB syntax has the first column as 0 when VB is a one-based array language. Have you tried a 1 there instead for the 2nd parameter?
On Wed, Jun 1, 2022 at 7:55 PM Paul Newtonpaul.newton.hudl@gmail.com wrote:
Hi
It's a few years old now, but I have the Sky Software Shell Megapack suite (V8) which contains the two (ActiveX) controls above as well as a drive combo control. I have used these successfully in the past but have run into a problem. The Fileview control has a Public Read-Write Property ColumnWidth which, according to the help file, "Gets/Sets the width of the column in pixels". The VB syntax in the help is:
Public Property ColumnWidth(ByVal ColumnName As String, ByVal ColumnIndex As Long) As Long
? MyFileView.ColumnWidth("Name",0) and ? MyFileView.Object.ColumnWidth("Name",0) both work fine and return 120.
Trying to set the column width as follows
MyFileView.ColumnWidth("Name",0) = 240 gives "Function argument value, type or count is invalid"
and MyFileView.Object.ColumnWidth("Name",0) = 240 gives "Syntax error"
Am I missing something (I have checked and there is no method or event on the control which references ColumnWidth).
Alternatively, can anybody suggest affordable (aka cheap, preferably free) alternatives to these controls which are designed to closely mimic the behaviour of Windows Explorer?
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
What happens if you try MyFileView.ColumnWidth("Name",0) = MyFileView.ColumnWidth("Name",0)
On Thu, Jun 2, 2022 at 12:17 PM Paul Newton paul.newton.hudl@gmail.com wrote:
Thanks Tracy
It's worth a try ... I tried ... and still get "Function argument value,type or count is invalid"
Paul
On 02/06/2022 17:39, Tracy Pearson wrote:
Have you tried to use the STORE command STORE 240 TO MyFileView.ColumnWidth("Name",0)
It might not work either.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Paul Newton Sent: Thursday, June 02, 2022 12:20 PM To:profoxtech@leafe.com Subject: Re: Problem setting ActiveX control property (Folderview and Fileview controls)
Thanks for the suggestion Eric but the first column is in fact 0 because the following
? MyFileView.ColumnWidth("Name",0) gives the correct result for the width of the first column Paul
On 02/06/2022 16:59, Eric Selje wrote:
It's interesting that the VB syntax has the first column as 0 when VB
is a
one-based array language. Have you tried a 1 there instead for the 2nd parameter?
On Wed, Jun 1, 2022 at 7:55 PM Paul Newtonpaul.newton.hudl@gmail.com wrote:
Hi
It's a few years old now, but I have the Sky Software Shell Megapack suite (V8) which contains the two (ActiveX) controls above as well as a drive combo control. I have used these successfully in the past but have run into a problem. The Fileview control has a Public Read-Write Property ColumnWidth which, according to the help file, "Gets/Sets the width of the column in pixels". The VB syntax in the help is:
Public Property ColumnWidth(ByVal ColumnName As String, ByVal ColumnIndex As Long) As Long
? MyFileView.ColumnWidth("Name",0) and ? MyFileView.Object.ColumnWidth("Name",0) both work fine and return 120.
Trying to set the column width as follows
MyFileView.ColumnWidth("Name",0) = 240 gives "Function argument value, type or count is invalid"
and MyFileView.Object.ColumnWidth("Name",0) = 240 gives "Syntax error"
Am I missing something (I have checked and there is no method or event on the control which references ColumnWidth).
Alternatively, can anybody suggest affordable (aka cheap, preferably free) alternatives to these controls which are designed to closely
mimic
the behaviour of Windows Explorer?
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Eric
Just tested that ... same error
Paul
On 02/06/2022 19:51, Eric Selje wrote:
What happens if you try MyFileView.ColumnWidth("Name",0) = MyFileView.ColumnWidth("Name",0)
On Thu, Jun 2, 2022 at 12:17 PM Paul Newtonpaul.newton.hudl@gmail.com wrote:
Thanks Tracy
It's worth a try ... I tried ... and still get "Function argument value,type or count is invalid"
Paul
On 02/06/2022 17:39, Tracy Pearson wrote:
Have you tried to use the STORE command STORE 240 TO MyFileView.ColumnWidth("Name",0)
It might not work either.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Paul Newton Sent: Thursday, June 02, 2022 12:20 PM To:profoxtech@leafe.com Subject: Re: Problem setting ActiveX control property (Folderview and Fileview controls)
Thanks for the suggestion Eric but the first column is in fact 0 because the following
? MyFileView.ColumnWidth("Name",0) gives the correct result for the width of the first column Paul
On 02/06/2022 16:59, Eric Selje wrote:
It's interesting that the VB syntax has the first column as 0 when VB
is a
one-based array language. Have you tried a 1 there instead for the 2nd parameter?
On Wed, Jun 1, 2022 at 7:55 PM Paul Newtonpaul.newton.hudl@gmail.com wrote:
Hi
It's a few years old now, but I have the Sky Software Shell Megapack suite (V8) which contains the two (ActiveX) controls above as well as a drive combo control. I have used these successfully in the past but have run into a problem. The Fileview control has a Public Read-Write Property ColumnWidth which, according to the help file, "Gets/Sets the width of the column in pixels". The VB syntax in the help is:
Public Property ColumnWidth(ByVal ColumnName As String, ByVal ColumnIndex As Long) As Long
? MyFileView.ColumnWidth("Name",0) and ? MyFileView.Object.ColumnWidth("Name",0) both work fine and return 120.
Trying to set the column width as follows
MyFileView.ColumnWidth("Name",0) = 240 gives "Function argument value, type or count is invalid"
and MyFileView.Object.ColumnWidth("Name",0) = 240 gives "Syntax error"
Am I missing something (I have checked and there is no method or event on the control which references ColumnWidth).
Alternatively, can anybody suggest affordable (aka cheap, preferably free) alternatives to these controls which are designed to closely
mimic
the behaviour of Windows Explorer?
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Paul
The control might just be really particular about the parameter being a long integer. I have seen discussion of this sort of problem where the person ended up writing a VB6 wrapper and calling that from VFP instead.
Alan
That sounds quite plausible. I know that it is possible to create a VB6 wrapper for a DLL (although I have never done so), but is it be possible to create a VB6 wrapper for an OCX ActiveX control with a visual interface?
If so, I am quite prepared to give it a go but wouldn't really know where to start. Can anybody offer some general guidelines as to how I would go about it?
Many thanks
Paul
On 03/06/2022 10:27, Alan Bourke wrote:
Paul
The control might just be really particular about the parameter being a long integer. I have seen discussion of this sort of problem where the person ended up writing a VB6 wrapper and calling that from VFP instead.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
Alan and all
Thanks to all who responded with suggestions. I ended up doing as Alan suggested and have written a VB6 wrapper for the control - no mean feat considering my very limited experience of VB. There are still one or two things to iron out so if anybody would be willing to assist, please let me know off-list.
Many thanks
Paul Newton
On 03/06/2022 10:27, Alan Bourke wrote:
Paul
The control might just be really particular about the parameter being a long integer. I have seen discussion of this sort of problem where the person ended up writing a VB6 wrapper and calling that from VFP instead.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
Hallo Paul,
are you shure that MyFileView.ColumnWidth("Name",0) is a property and not a method?
Have You tried MyFileView.ColumnWidth("Name",240)
Jörg
-----Ursprüngliche Nachricht----- Von: ProfoxTech profoxtech-bounces@leafe.com Im Auftrag von Paul Newton Gesendet: Donnerstag, 2. Juni 2022 19:18 An: profoxtech@leafe.com Betreff: Re: Problem setting ActiveX control property (Folderview and Fileview controls)
Thanks Tracy
It's worth a try ... I tried ... and still get "Function argument value,type or count is invalid"
Paul
On 02/06/2022 17:39, Tracy Pearson wrote:
Have you tried to use the STORE command STORE 240 TO MyFileView.ColumnWidth("Name",0)
It might not work either.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Paul Newton Sent: Thursday, June 02, 2022 12:20 PM To:profoxtech@leafe.com Subject: Re: Problem setting ActiveX control property (Folderview and Fileview controls)
Thanks for the suggestion Eric but the first column is in fact 0 because the following
? MyFileView.ColumnWidth("Name",0) gives the correct result for the width of the first column Paul
On 02/06/2022 16:59, Eric Selje wrote:
It's interesting that the VB syntax has the first column as 0 when VB is a one-based array language. Have you tried a 1 there instead for the 2nd parameter?
On Wed, Jun 1, 2022 at 7:55 PM Paul Newtonpaul.newton.hudl@gmail.com wrote:
Hi
It's a few years old now, but I have the Sky Software Shell Megapack suite (V8) which contains the two (ActiveX) controls above as well as a drive combo control. I have used these successfully in the past but have run into a problem. The Fileview control has a Public Read-Write Property ColumnWidth which, according to the help file, "Gets/Sets the width of the column in pixels". The VB syntax in the help is:
Public Property ColumnWidth(ByVal ColumnName As String, ByVal ColumnIndex As Long) As Long
? MyFileView.ColumnWidth("Name",0) and ? MyFileView.Object.ColumnWidth("Name",0) both work fine and return 120.
Trying to set the column width as follows
MyFileView.ColumnWidth("Name",0) = 240 gives "Function argument value, type or count is invalid"
and MyFileView.Object.ColumnWidth("Name",0) = 240 gives "Syntax error"
Am I missing something (I have checked and there is no method or event on the control which references ColumnWidth).
Alternatively, can anybody suggest affordable (aka cheap, preferably free) alternatives to these controls which are designed to closely mimic the behaviour of Windows Explorer?
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
_______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/eba64c02-3b0d-b56f-385a-facc826c4dc1@gmail.... ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Hi Jorg
Thanks for your reply but ColumnWidth is definitely a property ColumnWidth( ColumnName, ColumnIndex)
m.ColumnWidth = MyFileView.ColumnWidth("Name",0) MyFileView.ColumnWidth("Name",0) = m.NewColumnWidth
Paul
On 09/06/2022 11:23, Dr. Joerg Arand wrote:
Hallo Paul,
are you shure that MyFileView.ColumnWidth("Name",0) is a property and not a method?
Have You tried MyFileView.ColumnWidth("Name",240)
Jörg
-----Ursprüngliche Nachricht----- Von: ProfoxTechprofoxtech-bounces@leafe.com Im Auftrag von Paul Newton Gesendet: Donnerstag, 2. Juni 2022 19:18 An:profoxtech@leafe.com Betreff: Re: Problem setting ActiveX control property (Folderview and Fileview controls)
Thanks Tracy
It's worth a try ... I tried ... and still get "Function argument value,type or count is invalid"
Paul
On 02/06/2022 17:39, Tracy Pearson wrote:
Have you tried to use the STORE command STORE 240 TO MyFileView.ColumnWidth("Name",0)
It might not work either.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Paul Newton Sent: Thursday, June 02, 2022 12:20 PMTo:profoxtech@leafe.com Subject: Re: Problem setting ActiveX control property (Folderview and Fileview controls)
Thanks for the suggestion Eric but the first column is in fact 0 because the following
? MyFileView.ColumnWidth("Name",0) gives the correct result for the width of the first column Paul
On 02/06/2022 16:59, Eric Selje wrote:
It's interesting that the VB syntax has the first column as 0 when VB is a one-based array language. Have you tried a 1 there instead for the 2nd parameter?
On Wed, Jun 1, 2022 at 7:55 PM Paul Newtonpaul.newton.hudl@gmail.com wrote:
Hi
It's a few years old now, but I have the Sky Software Shell Megapack suite (V8) which contains the two (ActiveX) controls above as well as a drive combo control. I have used these successfully in the past but have run into a problem. The Fileview control has a Public Read-Write Property ColumnWidth which, according to the help file, "Gets/Sets the width of the column in pixels". The VB syntax in the help is:
Public Property ColumnWidth(ByVal ColumnName As String, ByVal ColumnIndex As Long) As Long
? MyFileView.ColumnWidth("Name",0) and ? MyFileView.Object.ColumnWidth("Name",0) both work fine and return 120.
Trying to set the column width as follows
MyFileView.ColumnWidth("Name",0) = 240 gives "Function argument value, type or count is invalid"
and MyFileView.Object.ColumnWidth("Name",0) = 240 gives "Syntax error"
Am I missing something (I have checked and there is no method or event on the control which references ColumnWidth).
Alternatively, can anybody suggest affordable (aka cheap, preferably free) alternatives to these controls which are designed to closely mimic the behaviour of Windows Explorer?
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Try addressing the Array with numbers instead of names. Foxpro has no concept of Names instead of rownumbers for parameters. (only in collections)
i.e. figure out what row index that "Name" has. Then use it like MyFileView.ColumnWidth(5,0) = 240
wOOdy
Thanks wOOdy
Column "Name" has index 0 and column "Item" has index 1, usw. It works like this:
ColumnWidth("Item",1) - the column returned is "Item" ColumnWidth("Item",2) - the 2 is ignored and the column returned is "Item" You can also return the "Item" column like this ColumnWidth("",1)
Paul
P.S. My spell checker suggested "Onionskin" for your surname ;)
On 09/06/2022 16:57, Jürgen Wondzinski wrote:
Try addressing the Array with numbers instead of names. Foxpro has no concept of Names instead of rownumbers for parameters. (only in collections)
i.e. figure out what row index that "Name" has. Then use it like MyFileView.ColumnWidth(5,0) = 240
wOOdy
Post Messages to:ProFox@leafe.com Subscription Maintenance:https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list:https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive:https://leafe.com/archives This message:https://leafe.com/archives/byMID/00c601d87c19$b1386780$13a93680$@wondzinski.... ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---