Solved

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

Posted on 2000-03-08
3
233 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
Comment Utility
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
Comment Utility
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
Comment Utility
GOOD HINT
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
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 …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now