WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: archimede on January 26, 2022, 12:46:53 AM

Title: Editbox - right adjust
Post by: archimede on January 26, 2022, 12:46:53 AM
Hallo.
Is it possible, in an Editbox control, to set "centered" or "right adjust"?
And is it possible the same with other text Controls?
Thank you very much
Title: Re: Editbox - right adjust
Post by: archimede on January 26, 2022, 01:39:45 AM
I see some other Controls (like Varytext or Statictext) is possible to set "centered" or "right align" for text, but I no see the same thing for Editbox
Title: Re: Editbox - right adjust
Post by: JTaylor on January 26, 2022, 07:59:26 AM
You might be able to do what you want with SendMessage().

https://docs.microsoft.com/en-us/windows/win32/controls/edit-control-styles

Jim
Title: Re: Editbox - right adjust
Post by: archimede on January 26, 2022, 08:55:39 AM
The problem is I no know the EditBox dimension because it is resized many times...
Title: Re: Editbox - right adjust
Post by: JTaylor on January 26, 2022, 09:36:21 AM
My thinking is it wouldn't matter.   You would be applying a style.  Not setting a position.   Could be wrong though.

Jim
Title: Re: Editbox - right adjust
Post by: JTaylor on January 26, 2022, 10:24:05 AM
After reading some more I realized you have to set most of the styles at creation.  Sorry.

Unless I am missing something it would seem easy to add.   It appears WinBatch checks the styles and only allows specific ones or one could add what they wanted to the Dialog styles.

Jim
Title: Re: Editbox - right adjust
Post by: archimede on January 27, 2022, 01:13:06 AM
Hallo.
I think it is a style problem, but WinBatch EditBox attributes no allows "centered" or "right align" style... How I can add that style to EditBox?

Thank you very much

Archimede
Title: Re: Editbox - right adjust
Post by: JTaylor on January 27, 2022, 07:12:31 AM
Sorry if I wasn't clear.  That is what I was saying.  The problem is that most styles for EditBoxes have to be applied at creation.   You cannot change them after that point.  The only solution I know is to convince the WinBatch folks to add those as an option.

Jim