|
Sorry, that did not work :/
Any other ideas?
Cheers
Sebs
|
|
|
|
|
I'm convinced that ScrollToCaret can be used for this, I'm just not sure what this "caret" thing is, but I'll probably figure it out now
|
|
|
|
|
By using AppendText instead of textbox.Text += newtext, it all works.
Thanks anyhow
|
|
|
|
|
Sometimes it's so simple
Too bad, this isn't mentioned on MSDN topic.
www.troschuetz.de
|
|
|
|
|
Yeah i found this method too. I guess the "caret" has something to do with the selection.
I'm sure with a few tries you will find out and make your code work
www.troschuetz.de
|
|
|
|
|
Yeah, that little "blinky" verticle line in a TextBox is the Caret. It call also be called the Insertion Point, Cursor, Blinky Thing, ...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
how do i convert a c++ declaration of a function like this
FT_STATUS FT_Read(FT_HANDLE, ftHandle, LPVOID IpBuffer, DWORD BytesRead,
LPDWORD BytesReturned)
where
ftHandle - Handle of the device to read.
lpBuffer - Pointer to the buffer that receives the data from the device.
BytesRead - Number of bytes to be read from the device.
BytesReturned - Pointer to a variable of type DWORD which receives the number of bytes read from the device.
to C#
|
|
|
|
|
[DllImport("mydllnamehere.dll")]
int FT_Read(IntPtr ftHandle, byte[] lpBuffer, uint BytesRead, out uint BytesReturned); That's a quick guess; I'm assuming FT_HANDLE is a typedef for void* . When calling it, you need to create the array of appropriate size first.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
I have a read-only textbox (I tried a label first, but for some reason it converted my \n's to a [] (a box) sign) that I need to put some text into. It is basically a chat program.
The problem is when the textbox becomes full, and more text is entered, the text goes out of view. It looks like it just keeps filling with text, but the textbox isn't "big" enough. How can I make it always show the bottom line, autoscrolling downwards in a way, like MSN Messenger for exmaple.
Sorry for the spelling errors, I'm late for lunch
|
|
|
|
|
|
Thanks, looks like it's better than the textbox, but I still don't see how I can get it to always show the last line. It now shows a scrollbar AND accepts my \n's, but as new text is entered at the bottom of the previous texts, it only creates a scrollbar so you _can_ scroll down to view the new messages, it does not however do any "automatic down-scrolling" so the latest messages are always viewable.
Sorry if I am being a pain in the ass :P
|
|
|
|
|
What you got from the above thread is the right. Otherwise if you want to implient using normal text box then set the Multiline property of text box control to true.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
I had multiline on, but it didn't allow me to set any autoscrolling on.
|
|
|
|
|
Set ScrollBars property of your textbox to vertical.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
I am sorry, but I don't see how that helps me, unless you expect people to be willing to scroll down manually for each new message (plus every time the user types his own message).
Yes, I want (nad have) a scrollbar, that is however not what I needed help about
|
|
|
|
|
|
Hello,
I have a TabControl with three TabPages and at one TabPage I add a panel and in the panel are 6 textBoxes and a vScrollBar. Unfortunately the problems occured when I deployed the application:
1)When I look at the tabPage the scrolling is not possible - I see the ScrollBar but only the top point of the scroll bar not the bottom point, although I set the size of my scroll bar in the VS Designer only as big as the tabPage..?
2)When I enable the SIP the Scroll Bar adapts to the size with the keyboard and scrolling is possible. But when I scroll down the scrollbar goes up as the textBoxes do. So after scrolling a while the top point of the ScrollBar cannot be seen...?
The code for that is as follows:
As fields I declared beside a panel, textBoxes, etc. these two variables.
private const int SB_HEIGHT_SIP = 188;
private const int SB_HEIGHT_NOSIP = 268;
The EventHandlers and the pResizeScrollBar looks as follows:
private void vScrollBar1_ValueChanged(object sender, System.EventArgs e)
{
panel1.Top = -vScrollBar1.Value;
}
private void Form1_Load(object sender, System.EventArgs e)
{
pResizeScrollBar();
}
private void inputPanel1_EnabledChanged(object sender, System.EventArgs e)
{
pResizeScrollBar();
}
private void pResizeScrollBar()
{
const int NO_OF_PAGES = 2;
if (inputPanel1.Enabled)
{
vScrollBar1.Height = SB_HEIGHT_SIP;
vScrollBar1.Maximum = panel1.Height - SB_HEIGHT_SIP;
}
else
{
vScrollBar1.Height = SB_HEIGHT_NOSIP;
vScrollBar1.Maximum = panel1.Height - SB_HEIGHT_NOSIP;
}
vScrollBar1.LargeChange = (int)(vScrollBar1.Maximum / (NO_OF_PAGES - 1)) + 1;
vScrollBar1.Maximum = vScrollBar1.LargeChange * NO_OF_PAGES - NO_OF_PAGES;
panel1.Top = -vScrollBar1.Value;
}
Please can anybody give me an explanation why these strange things occurs??
Thanks in Advance.
Best Regards
mat
|
|
|
|
|
Ok. You have few textboxes in your panel. You want scroll bar when number of text boxes increses and need to view. This is what i understood. For scrolling the content of a panel you don't want to add any scroll bar inside. Better way to tackle this is, set the autoscroll property of the panel to true. If so, panel will automatically add scroll bar if it contain more number of controls which is not in visible position.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
I want create program read user list from LDAP (on LINUX)
Every body help me.
Thank
|
|
|
|
|
|
I would like to mark a form as abstract and then inherit from that form.
My problem is that, when I open the child form. VS tells me that it's unable to open the mother form because it's abstract
any idea ?
|
|
|
|
|
You cannot instantiate an abstract class. Declaring a class as abstract is telling the compiler that you never want to instantiate it, only derive from it and instantiate the concrete derivatives.
What do you mean by "child form" and "mother form" in this context? When I think of that the parent form is opened before the child form is, so I can't think what you mean by it.
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
I know that it's impossible to instantiate an abstract class. And I don't want to.
The term mother form and child form are translated from french ... i'll try to explain a little better.
I have a form (fmBase) from wich I inherit all other forms in my application.
I will never instantiate fmBase in the application, only herited forms. I could live without declaring fmBase as abstract but I would like to declare abstract method in fmBase.
If I declare fmBase as abstract, it's impossible to open the inherited forms in the VS designer. VS says it can't create an instance of fmBase. I understand that it's impossible to crate an instance of fmBase to show in the designer, but I would just like to open an inherited form.
I hope I explained better that time, I'm french and it's sometimes difficult to put the right word at the right place
TIA
Julien
|
|
|
|
|
|