-
hi, i want to make a notepad clone, but want to have the line numbers running down the side of it, and i really dont know how to do it..any ideas?
and also how do i get it to scroll if i use a textbox or rich-txt-box and a label down the side? pls help me!
Thanks,
Mag-Net
-
labels surely don't solve your problem, write directly on the form, using print. To move the position to print use currentx and currenty. What do you mean with the scrolling? You can have a scrollbar scroll the text and then update the form in the event. use autoredraw to make the screenclearing nice. (cls)
-
Now i dont know how to make the line numbers scroll when u scroll the text box, there is no event or property???
if i used my own scroll bars, how do i get the text to scroll in the text box? there is no event is there?
thanks
-
I c your problem now, you must subclass in both cases for the scrolling and get an event(I don't know how) but it sure can be done
-
well err, does anyone now know how I am going to be able to do this? As I don't have a clue! :( thanks anyway....
-
you could put the line number sin a list box
-
hmm, yeah but doing this, i still have the problem of getting the listbox to scroll along with the text box wouldnt I, how do I get around that?
Thanks for the help :D
-
I'm not the person to tell you since i haven't subclassed that much but looked up (there was no WM_SCROLL) but there was WM_MBUTTONDOWN = &H207. You can probably get that one.
-
ok thanks, i dont know about subclassing...STOP laughing at me! I will read about it now, and then try it. thanks a lot!
-
Lol, i'm not laughing, seriously, i've made some subclassing, i made a control that does it but I'm not sure, Sam said it wouldn't be that easy, but it works for me
-
Look up AddressOf and SetWindowLong. Using these, you can intercept the Windows messages that are generated. SBM_GETPOS may be a helpful constant. Because you're interfering with Windows messages, it's a lot easier to crash your program, so you should save before each run.
-
thanks for that, i will try it out