?
Solved

Pls HELP!!!!! regarding edit box

Posted on 2000-02-26
7
Medium Priority
?
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 20 total points
ID: 2560604
Use a CFileDialog with the OFN_NOCHANGEDIR flag.

It should give you what you want.
0
Industry Leaders: 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!

 

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: 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.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

765 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