Programming > LCL

SynEdit Questions

(1/2) > >>

captian jaster:
Whats the property name for the strings highlited?
I checked the LCL site but i cant find it :\

And for my second question..
The Undo Procedure in lazarus Undos all of the things i backspaced.
The TSynEdit.Undo does it Char By Char
Or should i use a SynMemo?
Thanks  ;)

eoGroupUndo in Synedit.Options

Which Highlight you mean?
- Selection?
BlockBegin, BlockEnd, SelAvail,
    property DefaultSelectionMode;
    property SelectionMode;
    property SelectedColor;

- color for same word as word under caret
    property HighlightAllColor;

captian jaster:
The eoGroup thing works :D
By Highlight i mean the selected Strings yes
But how do you use SelAvail?
I did it with a basic IF NOT Code And IF  code and nothing worked ;_;


--- Quote from: captain jaster on August 14, 2010, 03:21:07 am ---By Highlight i mean the selected Strings yes

--- End quote ---

I am still unsure what you mean? "selected Strings" is plural. There is only one selection?

SelAvail is boolean, so
  "if not SelAvail then raise exception('no selection made');
should work (but is a bit of an overreaction)

You get the text via  SynEdit.SelText

Search the unit ide/SourceEditor.pp for examples

captian jaster:
Sorry for not being clear before..
By select I mean when you click and then highlight a text  :P
(For copying etc,etc).

I never found the SelText which is odd...
I know selAvail is boolean but i did a basic code with a

--- Code: Pascal  window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---IF NOT(SynEdit.SelAvail)Thenbegin   MyDropItem.Enabled := False;end; But even when i did Highlight a text it wouldn't Enabled itself :p
(Tried it with the NOT code but not with the Else yet.. That could be the problem) Maybe its not what im looking for.
Thanks again Martin :D


[0] Message Index

[#] Next page

Go to full version