Justify datafield at runtime

forum.advanced.programming (1998-2005)
Johannes Müller

Justify datafield at runtime

Post by Johannes Müller » 10 Apr 2003, 09:05

 Posted by:  Johannes Müller 

Hi,

I'm trying to justify a datafield at runtime. I did it with
VisWinSetStyle(hWnd, nStyle,TRUE), where
nStyle alternates through ES_RIGHT, WS_EX_RIGHT, WS_EX_RIGHT |WS_ED_RTLREADING,
but nothing works. I did it with SetWindowLong, too, with the same result.
Has anyone an idea or better a solution for my problem?

TIA, jo

Catalin

Re: Justify datafield at runtime

Post by Catalin » 10 Apr 2003, 09:57

 Posted by:  Catalin 

Hi,

It is not possible to change the justification of edit controls after the control has been created.
The only way I know is to destroy and recreate the control.
See attached sample.

Catalin
You do not have the required permissions to view the files attached to this post.

Jsfmllr
Germany
Posts: 69
Joined: 17 Nov 2019, 16:08
Location: Munich, Bavaria, Germany

Re: Justify datafield at runtime

Post by Jsfmllr » 25 Aug 2022, 07:54

Hello,

we have a similar problem.
We have BackgroundTexts ( BGT ) on a picTab, which should be justified right.
Setting the property does not do the job.
At designtime it is shown as needed.
At runtime, after changing a TAB, the BGT are shown justified LEFT.
Will the EDIT.APT be helpful for us?

TIA
Sepp

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

Re: Justify datafield at runtime

Post by Dave Rabelink » 25 Aug 2022, 10:15

Yes it is possible.

See this sample:
https://samples.tdcommunity.net/index.p ... rch_mode=f
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

Return to “advanced.programming”

Who is online

Users browsing this forum: [Ccbot] and 0 guests