webForumDet fria alternativet
Logga in / Bli medlem

aspSmartImage -- addText

ASP

3 svar · 216 visningar · startad av Eclipse

Medlem sedan juli 20003 825 inlägg
Trådstart#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?

Medlem 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
Medlem sedan juni 200032 967 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

Medlem 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"
264 ms totalt · 4 externa anrop · v20260731065814-full.51f67c91
126 ms — deklarationer (db)
0 ms — hämta statistik (cache)
133 ms — hämta tråd, inlägg och bilagor (db)
129 ms — ändringar (db)