Solved

Pls HELP!!!!! regarding edit box

Posted on 2000-02-26
7
177 Views
Last Modified: 2013-11-20
Hi,

in an edit box, initially there is some content, say : D:\\hyp\\database\\ ( name of the directory), then i wnat the user to enter the name of the database file, but i do not want them to change the directory name. (that is, disallow them to change the directory i set initially).

any one knows how to do that?

Pls help!!! thanks a lot!
0
Comment
Question by:greenbird
  • 3
  • 3
7 Comments
 
LVL 4

Expert Comment

by:inpras
ID: 2560580
U can show D:\\hyp\\database\\ in a static control and allow only database name in edit control.....
Just an Idea!!
0
 

Author Comment

by:greenbird
ID: 2560582
Hi,

but it does not look nice, rite? since half is static control, the other is edit box. or is it possible to make the static control look like the edit control? that is, in white background etc...i tried the styles , but can not...

any idea?

thanks a lot!
0
 
LVL 2

Accepted Solution

by:
bbousquet earned 10 total points
ID: 2560604
Use a CFileDialog with the OFN_NOCHANGEDIR flag.

It should give you what you want.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:greenbird
ID: 2560611
Hi,

hmm i did not get it. what i want is:

in an edit box, i initially write the directory name, say D:\\hyp\\database\\, i want the user to enter the name of the database file in the edit box, but without allowing them to change the dir name.

i do not use the CFileDialog...

any idea?

Thanks a lot!
0
 
LVL 2

Expert Comment

by:bbousquet
ID: 2560618
Well, you could trap every update of the edit box and refuse to accept modifications before a specified character, but that would be a pain.

You could also just refuse an invalid entry and let the user re-enter a new path/name, but I guess you don't want to do that.

What's wrong with using a CFileDialog? Common dialogs are made to be used... ;-)
0
 

Author Comment

by:greenbird
ID: 2560635
Hi,

but the database is a to-be-created one, that is, after the user specify the name, then i will create a new database with the specified name. so u c, CFileDialog is not appropraite in this case.... rite?
0
 
LVL 2

Expert Comment

by:bbousquet
ID: 2561198
Ah! Then that's another thing altogether.

Basically, you want the user to enter the name of the database file (to be created) but without changing the path to that new database.

Then I don't see why you would actually include the path in the edit box if the user is not allowed to change it. It's against all good sense.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
cat dog challenge 18 127
matchUp  challenge 6 69
tripleUp challenge 7 86
Remove Password Protection from pdf (with password) using an command line executable 5 62
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

860 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