webForumDet fria alternativet

aspSmartImage -- addText

ASPur ASP

3 svar · 216 visningar · startad av Eclipse

EclipseMedlem sedan juli 20003 825 inlägg
#1
Detta fungerar:

oSmartImage.FontFace = strImageFontFace
oSmartImage.FontColor = strImageFontColor
oSmartImage.AddText  [b]"Test me!!"[/b], strVAlign, strHalign

Detta fungerar inte:

oSmartImage.FontFace = strImageFontFace
oSmartImage.FontColor = strImageFontColor
oSmartImage.AddText  [b]strImageText[/b], strVAlign, strHalign

Förslag på alternativ?

EclipseMedlem sedan juli 20003 825 inlägg
#2
Lite relevant kod
' ## ADD TEXT
IF strImageText <> "" THEN
response.write strImageText & "<BR>"  & typeName(strImageText)
	oSmartImage.FontFace = strImageFontFace
	oSmartImage.FontColor = strImageFontColor
	oSmartImage.FontBold = bolBold
'	oSmartImage.AddText  "Test me!!", strVAlign, strHAlign
	oSmartImage.AddText  strImageText, strVAlign, strHAlign
END IF

Felmeddelande:

this is a test...
String 

Microsoft VBScript runtime error '800a000d' 

Type mismatch: 'AddText' 

/admin/company/aspSmart_confirm.asp, line 104
@ndersMedlem sedan juni 200032 969 inlägg
#3

vad innehåller strVAlign och strHAlign?

Edit: glöm det förresten, det verkar som att jag missförstod problemet i en första anblick.

mvh

EclipseMedlem sedan juli 20003 825 inlägg
#4
Detta funkar!

' ## ADD TEXT
IF strImageText <> "" THEN
response.write strImageText & "<BR>"  & typeName(strImageText)
	oSmartImage.FontFace = strImageFontFace
	oSmartImage.FontColor = strImageFontColor
	oSmartImage.FontBold = bolBold
'	oSmartImage.AddText  "Test me!!", strVAlign, strHAlign
	oSmartImage.AddText  [b]CStr(strImageText)[/b], strVAlign, strHAlign
END IF

Anders:
oSmartImage.AddText  "Test me!!", "TOP", "RIGHT"
345 ms totalt · 3 externa anrop · v20260731065814-full.29ac60f6
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
341 ms — hämta tråd, inlägg och bilagor (db)