Announcement

Collapse
No announcement yet.

Changing the Style of the TextBox

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Matthew Berg
    replied
    ...it's not possible to change ES_CENTER / ES_LEFT / ES_RIGHT after creation.
    Unless you create your own custom edit box by super-classing the standard Windows edit control, and take appropriate action when the WM_STYLECHANGED message is received.

    ------------------

    Leave a comment:


  • Semen Matusovski
    replied
    If to beleive books, it's not possible to change ES_CENTER / ES_LEFT / ES_RIGHT after creation.

    ------------------

    Leave a comment:


  • Lance Edmonds
    replied
    In general terms:

    Some control styles are dynamically adjustable (use GetWindowLong() and SetWindowLong() with the %GWL_STYLE flag), but other styles are only able to be set at control creation time.

    For styles that fit the latter case, your approach of destroying and recreating the control is the only possible method.

    In summary: the technique used depends on the style bits you want to change.



    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Scott Turchin
    replied
    Take a look in the source code Forum, seems someone posted such code before...

    ------------------
    Scott Turchin


    Leave a comment:


  • Anand Kumar
    started a topic Changing the Style of the TextBox

    Changing the Style of the TextBox


    I have designed a dialog box using DDT. This dialog contains a multiline text box and an option button for Text alignment (Left, Right And centre). Can anyone give me suggestions as to change the style of the textbox.

    Currently I am killing the textbox using "Control Kill" and then creating the new text box using "Control Add" with the modified properties. Is there some other way to do it.


    -------------
    Anand Kumar
Working...
X