Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AcePad (New Notepad Plus +)
#1
I renamed the application, since someone from SevenForums though the old one was silly... (Namely the admin that had the audacity to ban me without reason).

I got a line display, but it still has a few bugs to work out. I might have to use multithreading to display the numbers as it's a little slow with a lot of numbers. Word wrap on, makes the display go away (because word wrap doesn't have accurate line count). You'd need a more advanced line display like Notepad++...

So far the selected index of the listbox i'm using for the line display is a little off when you hold down the enter/return button to get a lot of line numbers on the left, it can be fixed by going back to the top and moving down, but it changes the index and is in sync with mouse clicks on the rtb control, as well as the up and down arrows

Bugs I know about so far:

-mouse scroll doesn't scroll for the line display view, only with word wrap on where the line display is hidden from view
-app lags a bit with large line counts while line display is showing
-horizontal scrollbar while line display is visible only shows when the scrollbar position is scrolled all the way down, I need to find a way to override the controls position for the scrollbar
-the selected line index on the left (highlight) is "off" by a bit sometimes

Other than that if I had those things fixed everything is good to go. I got the line display synced from switching between word wrap on and off though.

Preview:
[Image: ibvBfW.png]

I originally started out with a code like this for the line numbers:
Code:
Private Sub RichTextBox1_EnterKeyPressed(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles RichTextBox1.KeyDown
        Dim numlinecount As Integer
        If e.KeyData = Keys.Enter Then
            numlinecount = (RichTextBox2.GetLineFromCharIndex(RichTextBox2.Text.Length)) + 1
            RichTextBox2.AppendText(CStr(numlinecount) & vbLf)
        End If
    End Sub

That was all fine, but I didn't have a way to remove numbers based on how many line chars were removed. I had planned out another method that would count the lines on textchange, but then I realized that it would be too slow because having around 1000 lines, it would have to recount all 1000 before moving to the display for 1001. This is definitely not an easy task for a line display, i've tried all kinds of methods from different snippets created by myself, but nothing seemed to work 100% without at least one flaw.

Download:
http://www.multiupload.com/9YMSM9IM6N

Everything should work perfectly with the word wrap option on as it hides the line display. The line display should work too, it's just that there's a couple things that aren't correct with the visual. It doesn't display the correct index sometimes, and the mouse scroll doesn't work for it. Horizontal scroll doesn't appear unless you are scrolled all the way to the bottom.

Enjoy the rest of the countless features i've added over the past few months though.
Reply


Messages In This Thread
AcePad (New Notepad Plus +) - by AceInfinity - 07-04-2011, 01:32 AM
RE: AcePad (New Notepad Plus +) - by AceInfinity - 08-06-2011, 08:33 PM
RE: AcePad (New Notepad Plus +) - by AceInfinity - 08-07-2011, 07:59 PM
RE: AcePad (New Notepad Plus +) - by AceInfinity - 08-07-2011, 10:46 PM
RE: AcePad (New Notepad Plus +) - by AceInfinity - 08-08-2011, 03:36 AM
RE: AcePad (New Notepad Plus +) - by AceInfinity - 08-08-2011, 03:55 AM
RE: AcePad (New Notepad Plus +) - by AceInfinity - 08-08-2011, 05:05 AM
RE: AcePad (New Notepad Plus +) - by AceInfinity - 08-11-2011, 11:47 AM
RE: AcePad (New Notepad Plus +) - by Scream - 08-13-2011, 08:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Rlease] Advanced Notepad Chelloa 11 3,111 10-16-2011, 12:35 PM
Last Post: John.
  Notepad Plus + v2.5 [Coded by Ace] AceInfinity 94 27,919 08-13-2011, 08:29 AM
Last Post: Scream
  Red X's Custom Notepad version 3! Red X 21 6,255 08-01-2011, 01:02 PM
Last Post: Red X
  [Source] Notepad using MDI [/Source] KoBE 5 2,993 12-12-2010, 04:28 PM
Last Post: NathanE
  Red X's Custom Notepad VERSION 2! Now tabbed and music player included! Red X 22 8,588 11-18-2009, 02:30 PM
Last Post: Red X

Forum Jump:


Users browsing this thread: 6 Guest(s)