Skip to content

SetScrollingPixelSize

Sets the scrolling distance in pixels for the specified PrismaView. This method allows you to customize how much the view scrolls per mouse wheel increment, enabling fine-tuned control over the scrolling experience.

void SetScrollingPixelSize(PrismaView view, int pixelSize);
  • Type: PrismaView
  • Description: The PrismaView for which to set the scrolling distance
  • Type: int
  • Description: The scrolling distance value in pixels

This method returns void.

// Set scroll speed to 30 pixels per wheel increment
PrismaUI->SetScrollingPixelSize(view, 30);
logger::info("Scroll speed set to 30 pixels");
  • Reasonable Values: Use scroll sizes between 10-100 pixels for optimal user experience
  • Content Context: Adjust scroll speed based on the type of content being displayed
  • User Control: Allow users to customize scroll speed through settings
  • Consistency: Maintain consistent scroll behavior across similar UI elements