Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic HOW CAN I SET TEXT PROPERTIES FOR A BOX (Read 4952 times)
ashish_ampl
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 1
Joined: Sep 21st, 2005
HOW CAN I SET TEXT PROPERTIES FOR A BOX
Sep 21st, 2005 at 8:05pm
Print Post  
I am creating a BOX like this

set ObjBox = fc.CreateBox(intXPos, intYPos, intHeight, intWidth)

I am not able to set it's FONT,SIZE,BOLD etc.

objbox.Font gives an error.

PLEASE SUGGEST! URGENT
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: HOW CAN I SET TEXT PROPERTIES FOR A BOX
Reply #1 - Sep 22nd, 2005 at 3:41am
Print Post  
By default box.Font is null/nothing, so you must assign a new Font object to it before trying to access the font's Bold, Size, etc properties. I.e.

objBox.Font = new StdFont
objBox.Font.Size = 15
  
Back to top
 
IP Logged
 
Ashish Agarwal
Guest


Re: HOW CAN I SET TEXT PROPERTIES FOR A BOX
Reply #2 - Sep 22nd, 2005 at 12:46pm
Print Post  
I get this error when I use the suggested code

set objbox.Font = new stdfont
objbox.fontsize = 15

=====================

Error Type:
Microsoft VBScript runtime (0x800A01FA)
Class not defined: 'stdfont'
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: HOW CAN I SET TEXT PROPERTIES FOR A BOX
Reply #3 - Sep 22nd, 2005 at 1:15pm
Print Post  
Are you using VBScript in IE or ASP ? Try CreateObject ("StdFont") or Server.CreateObject ("StdFont").
  
Back to top
 
IP Logged
 
Ashish Agarwal
Guest


Re: HOW CAN I SET TEXT PROPERTIES FOR A BOX
Reply #4 - Sep 22nd, 2005 at 1:19pm
Print Post  
Thankkkkks . It's fine now
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint