I am creating an winform application that will run on a tablet PC. One form for this app will have a listview control.
I would like to allow the user to change the font size based on preference (ie did they remember their glasses today). A few ways that I can think of would be a numeric-up-down or +/- button controls. Both of these ways require screen real estate that is very limited.
Is there a control or technique that would allow font size changes with a hidden-when-not-used control?
UPDATE 1:
Based on suggestion from @GenericTeaType:
At the class level:
Stopwatch sw = new Stopwatch();
On the listview control:
private void lst1_MouseDown(object sender, MouseEventArgs e)
{
//start stopwatch
sw.Reset();
sw.Start();
}
private void lst1_MouseUp(object sender, MouseEventArgs e)
{
//stop stopwatch
sw.Stop();
//how long did stopwatch run for
TimeSpan elapsedTime = sw.Elapsed;
//show font change form if time exceeds 3 seconds
if (elapsedTime.Seconds >= 3)
{
//show form - pass in current listview font size
frmFontSizeChange ffsc = new frmFontSizeChange(slv.ReleaseFontSize);
ffsc.ShowDialog();
//refresh schedule with new font size
populate_lst1();
}
}
You could just show/hide a control for a certain period of time on the form MouseClick event.
For example:
What this would basically do is to show the FontSize changing control that you’ve made (or will make) when the user taps the screen. If they then don’t touch the control it’ll change when the
Timerticks. Or, it will go away after the user has stopped tapping the +/- for x amount of milliseconds.UPDATE for showing after 3 seconds.