Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » LineEdit, EditFields, DocEdit » DocEdit appned, highlight, mouse events
DocEdit appned, highlight, mouse events [message #26663] Tue, 18 May 2010 15:04 Go to next message
qwerty is currently offline  qwerty
Messages: 130
Registered: May 2006
Experienced Member
hello,

1, can I appending "string" to DocEdit?

something like:
mydocedit << "text";


2, how can I highlight(like mouse select) just the fragment of text sdded/set to DocEdit (if it's even possible), by code, not by mouse

3, can I somehow find out, which character, or the "sequel" or "rank" of the character drom the begining, when I move the mouse onto it?

ps: I could use RichTextView too

thank you


...erm, sorry for bad thread. admin, please move Neutral

[Updated on: Tue, 18 May 2010 15:30]

Report message to a moderator

Re: DocEdit appned, highlight, mouse events [message #26669 is a reply to message #26663] Tue, 18 May 2010 20:06 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
1. mydocedit << "text"; - No. At least in the version I have.
To check if a Ctrl has that kind of ability you should check ("Search in files" CtrlLib "operator<<" )if its class declaration has something like
void operator<<=(const String& s) { Set(s); }
If not:
a) make your own derived class and put the above line inside;
b) ask Mirek to add this feature.
Re: DocEdit appned, highlight, mouse events [message #26670 is a reply to message #26663] Tue, 18 May 2010 20:22 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
qwerty wrote on Tue, 18 May 2010 14:04

hello,

2, how can I highlight(like mouse select) just the fragment of text sdded/set to DocEdit (if it's even possible), by code, not by mouse




AFAIK, NO.
check/analyze Paint or Highlight methods in CtrlLib

a) to highlight automatically by some rules check CodeEditor (like syntax highlighting in upp theIde)
b) or use QTF and Ctrls which understand QTF.
Re: DocEdit appned, highlight, mouse events [message #26671 is a reply to message #26663] Tue, 18 May 2010 20:29 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
qwerty wrote on Tue, 18 May 2010 14:04



3, can I somehow find out, which character, or the "sequel" or "rank" of the character drom the begining, when I move the mouse onto it?




Do you mean character position?
But I think should check first answers 1 and 2.
Re: DocEdit appned, highlight, mouse events [message #26676 is a reply to message #26671] Wed, 19 May 2010 09:36 Go to previous messageGo to next message
qwerty is currently offline  qwerty
Messages: 130
Registered: May 2006
Experienced Member
Quote:


Do you mean character position?




yes, I mean character position Smile
or
whathewer info it could me give.

I am almost everytime checking api, but still learning whole cpp (when I am watching the upp sources Twisted Evil )

thank you
Re: DocEdit appned, highlight, mouse events [message #26799 is a reply to message #26663] Fri, 28 May 2010 15:14 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
qwerty wrote on Tue, 18 May 2010 09:04

hello,

1, can I appending "string" to DocEdit?

something like:
mydocedit << "text";




This should work:

mydocedit.Insert(mydocedit.GetLength(), "text);

Quote:


2, how can I highlight(like mouse select) just the fragment of text sdded/set to DocEdit (if it's even possible), by code, not by mouse



SetSelection.

Quote:


3, can I somehow find out, which character, or the "sequel" or "rank" of the character drom the begining, when I move the mouse onto it?



Not sure what you mean by that.

However, you can always use "GetCursor" to find out current cursor position and operator[] to get character at any position.

Mirek
Re: DocEdit appned, highlight, mouse events [message #26907 is a reply to message #26799] Tue, 08 June 2010 09:51 Go to previous messageGo to next message
qwerty is currently offline  qwerty
Messages: 130
Registered: May 2006
Experienced Member
great, thank you.

first two solutions works.

third hint; I wan to know the index in the docedit of character the mouse is on it.

is it possible?
thank you

ps: one little thing - can I scroll with docedit with some instruction in program? (like mousewheel and scrollbar)

[Updated on: Tue, 08 June 2010 10:11]

Report message to a moderator

Re: DocEdit appned, highlight, mouse events [message #26935 is a reply to message #26907] Thu, 10 June 2010 17:46 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
qwerty wrote on Tue, 08 June 2010 03:51

great, thank you.

first two solutions works.

third hint; I wan to know the index in the docedit of character the mouse is on it.



GetMousePos.

Quote:


ps: one little thing - can I scroll with docedit with some instruction in program? (like mousewheel and scrollbar)


ScrollUp, ScrollDown.
[SOLVED]Re: DocEdit appned, highlight, mouse events [message #26939 is a reply to message #26935] Fri, 11 June 2010 08:00 Go to previous message
qwerty is currently offline  qwerty
Messages: 130
Registered: May 2006
Experienced Member
thank you.

I am feel like dumbass; must be tired. working very much and I am not as smart as I wish... but I already choosen.

thnx for patience to all.

your ideas helped.

have a nice life

Previous Topic: DropList bug when compiling with SPEED option
Next Topic: Scan an timestamp
Goto Forum:
  


Current Time: Thu Mar 28 10:56:09 CET 2024

Total time taken to generate the page: 0.00898 seconds