|
Hi all,
I'm trying to make the horizontal scrollbar visible by assigning true to the HorizontalScroll.Visible attribute, but it's being ignored; the value is false even right after assigning true:
mainPanel.HorizontalScroll.Visible = hScrollVisible;
mainPanel.AutoScroll is false. A Google search provides no insight. Any idea why this is happening?
|
|
|
|
|
The scroll bars are only visible when AutoScroll is set to true and it contains something that is outside of the visible area.
The HorizontalScroll property is read only so setting any of it's elements will have no effect.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hi,
have a look at the HScroll property, which Forms.Panel inherits from
ScrollableControl
|
|
|
|
|
|
Post back if you sort it Alan as I'd be interested in the solution! I've had a look at the source for the Panel and ScrollableControl and it seems that all the calculations that decide whether to display the scroll bars are in private methods.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
I ran into that problem too, and decided I couldn't get away from AutoScroll = true.
The trick was resetting the AutoScrollMinSize member to the ACTUAL size of the control. This causes the scrollbars to appear (correctly-sized) when the control's content exceeds the actual size.
|
|
|
|
|
Glad to see that you are back Luc
|
|
|
|
|
Hi Giorgi,
Thanks. Actually I never left, I continue reading CP articles and forums,
but I refrain from reacting or answering most questions since I am not happy
with the direction this site is taking (quantity seems far more important than
quality), and in particular I object to the black and-white voting system.
But occasionally I do enter a single message.
Regards,
|
|
|
|
|
I remember reading about it on your blog here, at CP. As for black and white voting system, the user who has asked the question can vote in the same way as it was in last.
|
|
|
|
|
|
This might help[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
plz use Google before posting a question.
|
|
|
|
|
Dude, try google before asking a question
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
ths is 4rm, not msn/txt. plz dnt uz txtspk.
|
|
|
|
|
J4amieC wrote: ths is 4rm, not msn/txt. plz dnt uz txtspk.
Wtr fkn rs0l.
|
|
|
|
|
Can't use Google and is an annoying text speaker.
Blog link to be reinstated at a later date.
|
|
|
|
|
public void UpdateTextBox(String data)
{
if (this.InvokeRequired)
{
this.Invoke(new Action<string>
(UpdateTextBox), data);
return;
}
txtData.Text = data;
}
|
|
|
|
|
And again! Why are you posting random bits of meaningless code? If you have a question please spit it out, I don't do mind reading on a Friday.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
ListBox1.EnsureVisible(index)
|
|
|
|
|
Is there meant to be a question here?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I'm not sure there's intelligent life there.
|
|
|
|
|
Pete O'Hanlon wrote: not sure there's intelligent life there.
Basing on how well formed the inquiry was, I am sure you are right on
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
1. You shouldn't use the default variable names. ListBox1 tells you nothing about the purpose of the listbox, and is unmaintainable - rename it to something more appropriate such as theProgrammerWhoPutThisListBoxInIsACompleteMoronWhoMustBeHuntedDownBeforeHeGetsTheChanceToReproduceNotThatHeStandsMuchOfAChanceOfMating.
2. Don't post snippets here. This forum is for questions, it's not notepad.
3. See suggested variable name in 1.
|
|
|
|
|
You got my 5 for the variable name. Hope you don't mind if I borrow for my next project
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Feel free. And while you're at it, ask her if she's got a sister.
|
|
|
|