Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Porting VB samples to VFP
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00604153
Message ID:
00814745
Views:
17
Does anyone know if it would be possible to wrap this method in a VB active-x that could set these properties for vfp ?




>Michael,
>
>Did you ever find a way around this ?
>
>I need to set some properties this way also:
>
>.oTX.TableCellAttribute( .tableID, .tableRow, .tableColumn, txTableCellHorizontalExt ) = .sSpnCellWidth.VALUE
>
>TIA
>Greg
>
>
>
>>Quite frequently ActiveX vendors provide only VB samples which don't work straightforwardly in VFP. For instance XMLTreeX control from Mabry
>>
>>VB sample
>>Private Sub Form_Load()
>> Set itemsObj = XMLTreeX1.Items
>> index = 0
>> Randomize
>>
>>
>> XMLTreeX1.Columns.Add "Subject"
>> XMLTreeX1.Columns("Subject").HeaderItalic = True
>> XMLTreeX1.Columns.Add("From").Alignment = CenterAlignment
>> XMLTreeX1.Columns("From").AllowSizing = False
>> XMLTreeX1.Columns.Add "To"
>> XMLTreeX1.Columns.Add "Date"
>> XMLTreeX1.Columns.Add "Message"
>> Dim i As Long
>>
>> For i = 0 To 3
>>
>> Dim h As HXMLTREEITEM
>> h = itemsObj.InsertItem
>> itemsObj.CaptionCell(h, "Subject") = "XMLTree/X This is a bit of text that should break the line " & i
>>
>>VFP form init method
>>
>> itemsObj = thisform.XMLTreeX1.Items
>> index = 0
>>
>>
>> thisform.XMLTreeX1.Columns.Add ("Subject")
>> thisform.XMLTreeX1.Columns("Subject").HeaderItalic = .T.
>> thisform.XMLTreeX1.Columns.Add("From").Alignment = 1 && CenterAlignment
>> thisform.XMLTreeX1.Columns("From").AllowSizing = .F.
>> thisform.XMLTreeX1.Columns.Add("To")
>> thisform.XMLTreeX1.Columns.Add("Date")
>> thisform.XMLTreeX1.Columns.Add ("Message")
>>
>> h = 0
>>
>> For i = 0 To 3
>>
>> h = thisform.XMLTreeX1.Items.InsertItem
>>&& either
>>itemsObj.CaptionCell(h, "Subject" ) = store "XMLTree/X This is a bit of text that should break the line " + str(i)
>>&& or
>>store "XMLTree/X This is a bit of text that should break the line " + str(i) to itemsObj.CaptionCell(h, "Subject" )
>>
>>&& or
>>thisform.XMLTreeX1.Items.CaptionCell(h, "Subject" ) = "XMLTree/X This is a bit of text that should break the line " + str(i)
>>
>>fails with "invalid subscript reference"
>>
>>Could anyone advise a general approach ( if exists ) when some VB code using ActiveX control needs to be ported to VFP. Apart from accessing collections I mean symbolic constants as well which VB sees such as "CenterAlignment" ( requires either browsing help or tracing VB code to find value in VFP ) , "HXMLTREEITEM" or because VFP is typeless I am asking too much.
>>
>>Thank you.
>>Michael
Greg Foote
Software At Work, Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform