[C#.NET]Scrollbar Maximum wordt nooit gehaald

Pagina: 1
Acties:

  • Grimm9mm
  • Registratie: Maart 2000
  • Laatst online: 14-05 20:22
Ik ben bezig met een applicatie met meerdere panelen die op 1 HScrollbar moeten reageren, maar wat me opviel was dat de scrollbarvalue NOOIT de 100 (ingestelde maximum waarde) haalde. Hoe komt dit? Als dat schuifbalkje helemaal naar rechts tegen de knop is geschoven, dan heeft hij maar 91 aan... en om direct elke keer met 9 erbij te compenseren... dat is VRAGEN om exceptions.
Komt dit misschien door de windowsXP-skins?

  • Grimm9mm
  • Registratie: Maart 2000
  • Laatst online: 14-05 20:22
Kick!

  • Akerboom
  • Registratie: Juni 2001
  • Laatst online: 26-05 08:56

Akerboom

Codito, ergo sum

Remarks
You might consider adjusting the Maximum property dynamically to match the size of the scroll bar's parent in proportion to pixel size or to the number of rows or lines displayed.

Note The value of a scroll bar cannot reach its maximum value through user interaction at run time. The maximum value that can be reached is equal to the Maximum property value minus the LargeChange property value plus one. The maximum value can only be reached programmatically.
bron: http://msdn.microsoft.com...lbarclassmaximumtopic.asp