Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Adding Markers in TScrMemo

 Post Reply Post Reply
Author
Lorenz Sonja View Drop Down
New Member
New Member
Avatar

Joined: 26 Apr 2011
Posts: 10
Post Options Post Options   Quote Lorenz Sonja Quote  Post ReplyReply Direct Link To This Post Topic: Adding Markers in TScrMemo
    Posted: 06 Nov 2019 at 10:24am
Hi, i am using the following code to add marker to the Gutter on the GutterClick event.

[CODE]
void __fastcall TMainForm::ScriptEditorGutterClick(TObject *Sender, int LineNo)
{
  bool marker = ScriptEditor->HasMarkers();
  if (marker)
ScriptEditor->RemoveMarker(LineNo);
  else
ScriptEditor->AddMarker(LineNo, 1);
}

I am not sure about the MarkerImageIndex property. How can I set the MarkerImage Index ? I am using C++ Builder 10.3 
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 8326
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 06 Nov 2019 at 10:53am
The 2nd parameter of the AddMarker() method is the image index for the marker image to be used.
Back to Top
Lorenz Sonja View Drop Down
New Member
New Member
Avatar

Joined: 26 Apr 2011
Posts: 10
Post Options Post Options   Quote Lorenz Sonja Quote  Post ReplyReply Direct Link To This Post Posted: 06 Nov 2019 at 12:21pm
Thanks for clearing that, i was simply missing the Image list..Now, the marker apperas on click..
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down