Solved

Pls HELP!!!!! regarding edit box

Posted on 2000-02-26
7
174 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
not able to insert into temp table 68 150
Named range not carried over 10 57
modThree challenge 4 64
withoutTen challenge 14 88
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

708 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

18 Experts available now in Live!

Get 1:1 Help Now