Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

An EditBox - "Half hidden and Half Active"!!!?

Posted on 2000-03-08
3
Medium Priority
?
248 Views
Last Modified: 2010-04-02
Hi,
                   I am a student. 'am developing an application for my college. I am using VC++6.0 as the front end and SQLServer 6.5 as the back end.  
One of the forms in the application has 12 fields for filling in specific data. Now i want to include an edit box for the purpose of "comments" to be filled by the users. And this application shall serve  mutliple users.                      Each  user opens the same form and makes some changes to certain fields and he adds his comments finally, in the edit box.
 Now, as a measure of security, i want to hide the comments given by an earlier user in the editbox. Now, I mean, i want to hide "only" the comments  given by the earlier user, but, now  the editbox must be active for the next  user to add on his own comments(this is basically to  ensure that the latest user doesn't changes the comments added by the earlier user, but  can c                   the other users comments existing in the edit box).

 Now my question is , Is this possible using an EditBox? If not, is there any other control or mechanism to implement this. How can i store or implement this "commentsfield"  in the database for such kind of retrieval wherein the editbox is half hidden(with the comments by the earlier user visible but not in write mode) and half active(for the new user to enter his                  comments, "all in the same editbox"??


thanx,
maddy
0
Comment
Question by:madhivanan
3 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 2596940
I think what you need to do is to look at the "function" of the edit box a little differently.  it doesn't store "all" the comments.  Only the comments to be added.  i.e when the user first sees the edit box it will be empty.  They will type in the information to be appended to the comments.  then when you update the database, you append the information they typed to the information already stored in the comments.  

Does that make sense?
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 0 total points
ID: 2598558
rich edit controls allow you to 'protect' some of the text (ie. cannot change/delete it).  rich edit controls are a little tricky to use (can't just drop one straight in).

I think a two-box system would be better.  One is read-only (so you can still scroll it and copy from it) and the other lets you enter new comments.

Another thought is to have a list control instead of the first read-only list box .. but that would limit you (without some extra work) to a sigle (long) line per comment.  If this is ok, then that is probably better, as it is easily expandable to, say, have a column for the date+time entered and another for the comment and maybe one for the person who entered it, and would allow things like sorting by any of these fields.  You'd probably want to turn of direct editing of the contents of the list.
0
 

Author Comment

by:madhivanan
ID: 2610995
GOOD HINT
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question