setting form property on runtime

Discussion forum about all things Team Developer 7.x
EwaldP
Austria
Posts: 143
Joined: 07 Mar 2017, 08:00
Location: Austria

setting form property on runtime

Post by EwaldP » 31 Oct 2018, 11:00

Hi,

is it possible to set the form properties at runtime (eg font size).

SalFontSet at SAM_Create is not the solution because there is a different behaviour if I set the font size at runtime at SAM_Create or I set the font size in the property editor end run the application.

Thanks
Ewald P. Palmetshofer
EDV-Hausleitner GmbH
4020 Linz
www.edv-hausleitner.at

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 1274
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: setting form property on runtime

Post by Dave Rabelink » 31 Oct 2018, 11:29

EwaldP wrote:
31 Oct 2018, 11:00
...because there is a different behaviour if I set the font size at runtime at SAM_Create or I set the font size in the property editor end run the application.
What is the different behavior?
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

EwaldP
Austria
Posts: 143
Joined: 07 Mar 2017, 08:00
Location: Austria

Re: setting form property on runtime

Post by EwaldP » 31 Oct 2018, 12:11

Hi Dave,

as you can see in the sample. If I set the font size of a window in the property editor the tab bar will be positioned at the right y location. When I set the font size of a form at SAM_Create the tab bar has the right size but a wrong y location. Don't know if this is a bug.

TestCase FormFontSize.zip
You do not have the required permissions to view the files attached to this post.
Ewald P. Palmetshofer
EDV-Hausleitner GmbH
4020 Linz
www.edv-hausleitner.at

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 823
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Re: setting form property on runtime

Post by Igor Ivanovic » 31 Oct 2018, 12:44

Hi,

It seems that your apt is an TD6.3 file.
I see the problem you are describing in TD6.3, the funny thing is that if I start the repro in TD7.0 or TD7.1 TD just silently dies on both versions.
Anybody else seeing this also?

edited
If I use SalFontGet and then SalFontSet everything works as it should, there is no difference between the font set in properties and with SalFontSet.
So it seems that SalFontSet doesn't like the STRING_Null in font name.
Igor Ivanovic
Image

thomas.uttendorfer
Site Admin
Site Admin
Germany
Posts: 171
Joined: 05 Mar 2017, 17:19
Location: Munich Germany

Re: setting form property on runtime

Post by thomas.uttendorfer » 31 Oct 2018, 13:38

Hi,
I tried your sample with 7.0.3.
In SalSetFont(..) I had to set the real FontName - with STRING_Null the application died.

Hight of the window was a bit higher with On SAM_Create SalFontSet(..) - maybe 10 px or so.
But tabbar and all other controls were correct.

So it seems to be a bug in TD6.3 which is fixed in higher versions.

Regards Thomas
Thomas Uttendorfer
[ frevel & fey ] Software-System GmbH
https://thomasuttendorfer.wordpress.com/

EwaldP
Austria
Posts: 143
Joined: 07 Mar 2017, 08:00
Location: Austria

Re: setting form property on runtime

Post by EwaldP » 31 Oct 2018, 15:41

Thanks for the info and the efforts.

Regards Ewald
Ewald P. Palmetshofer
EDV-Hausleitner GmbH
4020 Linz
www.edv-hausleitner.at

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 1 guest