cancel
Showing results for 
Search instead for 
Did you mean: 

FontSize property returns -1

Former Member
0 Kudos

I'm trying to retreive the FontSize property from a form item. But it returns a -1.

I have tried:

>ReadOnly Property FormItemFontSize() As Integer

>

> Get

>

> oForm = oSboApp.Forms.Item(FormUID_PropVal)

> oFormItem = oForm.Items.Item(ItemUID_PropVal)

> Return oFormItem.FontSize

>

> End Get

>

>End Property

...and:

> intB1FontSize = oSboApp.Forms.Item(FormUID).Items.Item("230").FontSize

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I don't know about older versions, but in 2007a this seems to be stored in C:\Documents and Settings\<username>\Local Settings\Application Data\SAP\SAP Business One\b1-current-user.xml

I'm using a C# add-on and I used Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) to get the Application data folder, read the file, and then used an XMLDocument to parse the XML and retrieve the font.

Answers (1)

Answers (1)

Nussi
Active Contributor
0 Kudos

Hi Paul,

when you create a form per default the font_size for the item is -1

for example look in your screenpainter created xml.

overwrite it and save the xml again to have the real size in the xml

regards

David

Former Member
0 Kudos

Thanks, but I'm trying to get the font size of a system form.

I am trying to determine which font size is set for Business One. Maybe there's a better way?

Nussi
Active Contributor
0 Kudos

i don't know - i knew it only for user forms.

i've no idea where to get the setting from - i now tried to find it with profiler but had no luck.

looks like it is saved external

sorry

David