Re: profiling
- Posted by Tone Škoda <tskoda at email.si> Feb 15, 2005
- 567 views
Juergen Luethje wrote: > Also to me it looks very helpful, thank you! > There is one little thing though. When after clicking at the [next] or > [previous] button a line is highlighted that is longer than the width of > the window, the text automatically scrolls to the right. Can I disable > that automatic scrolling? Just replace this new procedure with old one ("select line" part changed):
procedure jump (integer index_) integer charIndex integer line integer startIndex, endIndex CurIndex = index_ --// --// jump to line: --//=> line = Data [index_] [LINE_NUM] charIndex = sendMessage (TextEdit, EM_LINEINDEX, line - 1, 0) setFocus (TextEdit) Void = sendMessage (TextEdit,EM_SETSEL, charIndex, charIndex) --// --// select line: --//=> --// edittext_select_line (TextEdit, line) startIndex = sendMessage (TextEdit, EM_LINEINDEX, line - 1, 0) endIndex = startIndex + sendMessage (TextEdit, EM_LINELENGTH, startIndex, 0) setFocus (TextEdit) Void = sendMessage (TextEdit, EM_SETSEL, endIndex, startIndex) setFocus (TextEdit) edittext_ensure_in_center (TextEdit, line, 0) setFocus (TextEdit) statusbar_part__settext_and_resize (StatusWin, SB_CUR, sprintf ("%d/%d", {index_, length (Data)})) statusbar_part__settext_and_resize (StatusWin, SB_PERC, sprintf ("%.2f%%", {100 * Data [index_] [LINE_VAL] / Sum})) statusbar_part__settext_and_resize (StatusWin, SB_MSG, "") end procedure