Link to home
Start Free TrialLog in
Avatar of shawn857
shawn857

asked on

Question about using SynEdit

Hi experts, I've become aware recently of a Delphi component called SynEdit and I'm thinking it would work a lot smoother than the TRichEdit I'm using in my project now. Specifically, I would like to be able to drag and drop any of the individual characters within the SynEdit control, to another position within the same SynEdit control (basically, have the ability to "re-arrange"). Can this actually be done in SynEdit, and if anyone has had any success in doing so, could they kindly show sample code?

Thanks!
    Shawn

P.S: I'm using Delphi 7
ASKER CERTIFIED SOLUTION
Avatar of jimyX
jimyX

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shawn857
shawn857

ASKER

Hi Jimy... OK I had just downloaded and installed it a couple of hours ago and didn't try it. I just tried it now by simply dropping a SynEdit component onto a form and the drag/drop works just like I hoped!! That was easy, hahah!
   I just need to know now how to work with SynEdit, as there doesn't appear to be any documentation. I just need to do things in SynEdit that are like in TRichEdit - like change attributes (color, style, underline, etc) of each character during runtime, and so on. Do you know of any sample projects or sites that could give me some guidance Jimy?

Thanks!
    Shawn
> I just need to know now how to work with SynEdit, as there doesn't appear to be any documentation.

Do not have any docs for it, and haven't seen any. But the demos should get you started, and when facing issues you can google or post here.
Also you could subscribe in the Mailing Lists, where you could find some useful details, or get help when required.
OK Jimy thanks I'll start to go through the demos. I'm just wondering if SynEdit behaves in a similar way to a TRichEdit where you use things like SelStart and SelLength to set the text attributes... or is it done a completely different way.

Thanks
    Shawn
Despite the similarities, SynEdit is totally different than RichEdit.
For instance there is no selAttributes, but there is SelStart and SelLength.
I do not know really how to achieve that. Haven't tried that before.
Yeah, I'm looking more at SynEdit here Jimy and I'm not sure if it's gonna work for me. I really don't need words or characters "highlighted" - that seems to be the purpose of SynEdit... I just need to move around (drag/drop) individual characters freely within the edit control. So far at least, I don't see a way in SynEdit to "assign" each character its own color/style/etc. I do love the drag/drop ability within the SynEdit control, but the assigning of attributes to each character might be the problem... or not possible.

Thanks
  Shawn