tags:

views:

57

answers:

3

I am working on window application. I have a form where I will be displaying terms and conditions against shopping done. Below Terms and Conditions, I want to show Checkbox which user have to check as an acceptance before proceeding.

This Checkbox should come below the terms and conditions. If terms and conditions are long enough then user have to scroll down to make sure he has gone through all the agreement. Only after which he can check.

I was thinking to do it with rich textbox. Is it possible to do with any way.

A: 

use a panel to hold the richTextbox and the checkbox. set

Panel.AutoSize=false; 
Panel.AutoScroll=true;

richTextbox.Dock=DockStyle.Top;
richTextbox.ScrollBars=RichTextBoxScrollBars.None;
richTextbox.Height=richTextbox.lines.length*20; 

checkBox.Dock=DockStyle.Bottom;

EDIT

To make checkBox always follows the richTextbox, add following code after:

checkBox.Dock=DockStyle.None;
checkBox.Location=new Point(checkBox.Location.X, richTextbox.Height+richText.box.Location.Y);
Bolu
+1  A: 

Don't.

  • Concerning new users, the checkbox will stay unnoticed by most users, and things will be really confusing when the user will, on submit, see the message saying she didn't check the checkbox, but there will be no visible checkbox in the form. Since there are no existing forms which use such thing, few people will be able to guess it, so some users will just abandon the process, and other will go submit a bug, telling you that the checkbox is missing.
  • Concerning old users, they don't and won't need to read Terms and Conditions every time, so putting the checkbox at the end creates excise, but brings nothing at all to compensate it.

But you can. Now, technically, you can use a scrollbar, then put in the scrollable area a richedit (with no inner scroll) and a checkbox below. I don't think there is a way to put the checkbox inside the richedit.

MainMa
+1  A: 

Use scrollbar events to determine when user scrolled whole text and then set checkbox visible. In that case checkbox can be initialy posiotioned outside rich text box ( ex. below).

zgorawski
+1 for good idea.
Bolu
+1 for the idea. But maybe it would be better not to show/hide, but to enable/disable the checkbox according to the scroll events.
MainMa