Author Topic: Editbox - right adjust  (Read 595 times)

archimede

  • Full Member
  • ***
  • Posts: 112
Editbox - right adjust
« 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

archimede

  • Full Member
  • ***
  • Posts: 112
Re: Editbox - right adjust
« Reply #1 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

JTaylor

  • Pundit
  • *****
  • Posts: 1832
    • Data & Stuff Inc.
Re: Editbox - right adjust
« Reply #2 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

archimede

  • Full Member
  • ***
  • Posts: 112
Re: Editbox - right adjust
« Reply #3 on: January 26, 2022, 08:55:39 am »
The problem is I no know the EditBox dimension because it is resized many times...

JTaylor

  • Pundit
  • *****
  • Posts: 1832
    • Data & Stuff Inc.
Re: Editbox - right adjust
« Reply #4 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

JTaylor

  • Pundit
  • *****
  • Posts: 1832
    • Data & Stuff Inc.
Re: Editbox - right adjust
« Reply #5 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

archimede

  • Full Member
  • ***
  • Posts: 112
Re: Editbox - right adjust
« Reply #6 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

JTaylor

  • Pundit
  • *****
  • Posts: 1832
    • Data & Stuff Inc.
Re: Editbox - right adjust
« Reply #7 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