Click here to Skip to main content
15,908,111 members
Home / Discussions / C#
   

C#

 
GeneralRe: textbox with auto "scrolling" Pin
Stefan Troschuetz26-Oct-04 22:53
Stefan Troschuetz26-Oct-04 22:53 
GeneralRe: textbox with auto "scrolling" Pin
Member 146896026-Oct-04 23:33
Member 146896026-Oct-04 23:33 
GeneralRe: textbox with auto "scrolling" Pin
sreejith ss nair26-Oct-04 23:06
sreejith ss nair26-Oct-04 23:06 
GeneralRe: textbox with auto "scrolling" Pin
Member 146896026-Oct-04 23:34
Member 146896026-Oct-04 23:34 
GeneralRe: textbox with auto "scrolling" Pin
sreejith ss nair26-Oct-04 23:39
sreejith ss nair26-Oct-04 23:39 
GeneralRe: textbox with auto "scrolling" Pin
Member 146896026-Oct-04 23:46
Member 146896026-Oct-04 23:46 
GeneralRe: Welcome to Edit and Continue Pin
Stefan Troschuetz26-Oct-04 22:25
Stefan Troschuetz26-Oct-04 22:25 
GeneralStrange problem with ScrollBars - need urgent help Pin
mathon26-Oct-04 22:17
mathon26-Oct-04 22:17 
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??Frown | :(

Thanks in Advance.

Best Regards

mat
GeneralRe: Strange problem with ScrollBars - need urgent help Pin
sreejith ss nair26-Oct-04 22:32
sreejith ss nair26-Oct-04 22:32 
GeneralHelp me use LDAP Pin
htphuc26-Oct-04 22:05
htphuc26-Oct-04 22:05 
GeneralRe: Help me use LDAP Pin
sreejith ss nair26-Oct-04 23:00
sreejith ss nair26-Oct-04 23:00 
GeneralForm inheritance Pin
Julien Ferraro26-Oct-04 22:05
Julien Ferraro26-Oct-04 22:05 
GeneralRe: Form inheritance Pin
Colin Angus Mackay26-Oct-04 22:18
Colin Angus Mackay26-Oct-04 22:18 
GeneralRe: Form inheritance Pin
Julien Ferraro27-Oct-04 19:15
Julien Ferraro27-Oct-04 19:15 
GeneralWelcome to Edit and Continue Pin
Alex Korchemniy26-Oct-04 21:59
Alex Korchemniy26-Oct-04 21:59 
GeneralRe: Welcome to Edit and Continue Pin
sreejith ss nair26-Oct-04 22:25
sreejith ss nair26-Oct-04 22:25 
Generalalgorithm for expiration date of trial software using C# Pin
jomargon26-Oct-04 21:27
jomargon26-Oct-04 21:27 
GeneralRe: algorithm for expiration date of trial software using C# Pin
sreejith ss nair26-Oct-04 22:23
sreejith ss nair26-Oct-04 22:23 
Generalunable to import merge module Pin
mhmoud rawas26-Oct-04 21:04
mhmoud rawas26-Oct-04 21:04 
Generalanalyzing a string Pin
Anonymous26-Oct-04 20:32
Anonymous26-Oct-04 20:32 
GeneralRe: analyzing a string Pin
sreejith ss nair26-Oct-04 22:20
sreejith ss nair26-Oct-04 22:20 
GeneralRe: analyzing a string Pin
Colin Angus Mackay26-Oct-04 22:22
Colin Angus Mackay26-Oct-04 22:22 
GeneralListView ScrollBar Pin
Zishan Haider26-Oct-04 19:50
Zishan Haider26-Oct-04 19:50 
GeneralRe: ListView ScrollBar Pin
sreejith ss nair26-Oct-04 22:16
sreejith ss nair26-Oct-04 22:16 
GeneralRe: ListView ScrollBar Pin
Zishan Haider26-Oct-04 22:34
Zishan Haider26-Oct-04 22:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.