Recent

Author Topic: Margin properties for the margin within a EDIT control, Memo included..  (Read 1862 times)

jamie

  • Hero Member
  • *****
  • Posts: 7589
Windows supports Margins for the Edit controls so that you can limit the text entered there by allocating space so that one could place an icon control over that space or other dodads

 I do this for that now
Code: Pascal  [Select][+][-]
  1. SendMEssage(Edit1.handle, EM_SETMARGINS,EC_LEFTMARGIN, MakeLong(10,0));
  2.                                                                          
  3.  

That gives me a left margin in the edit box..

 This only works with windows as far as I know, how about the other widgets, how do they do this ?
The only true wisdom is knowing you know nothing

jamie

  • Hero Member
  • *****
  • Posts: 7589
I see there are a lot of lookers but no one is answering..

Mayne someone with a gkt,qt etc widget can try that with a TEdit on the form to see if it actually places a margin limit to the left of editing..

I would appreciate that if someone could try that, I don't have a Linux/Unix type setup here to try that myself.
The only true wisdom is knowing you know nothing

jamie

  • Hero Member
  • *****
  • Posts: 7589
I don't have a PC with Linux on it so I need to rely on others experimenting.. but I just had
someone put a TEDIT control in and set the Parent of that EDIT control to a Tcombobox.

 Setting the left, top := 0;

 The idea is to put the combobox into OwnerDrawFixed mode but have a TEDIT setting at the edit portion of the combo box to emulate one in normal csDropDown..

 This way I can shorten the EDIT control so that I get the margins in the COmbobox edit control this way.. I can work out the details with keyboard focusing etc..

 But the person that tested this for me states that when parenting the edit box to the Combobox it splits the combobox up. so this does not work I guess.

 Also if they create a TEDIT on the form and overlay it ontop of the combobox, when the combobox receives focus you can't see the TEDIT control..

 So I guess this isn't possible either.

 I need a margin so I can draw graphics left or right of the editable area.. 

 This all works nicely in windows as it knows how to parent EDIT controls I guess.

The next experiment is to emulate a Edit control while being in OwnerDrawFixed mode but then again the Caret functions most likely won't behave the same way as windows too...
just my luck I guess.

 
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018