Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Porting VB samples to VFP
Message
 
À
14/01/2002 00:00:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00604153
Message ID:
00814733
Vues:
21
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform