BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Synchonizing EditBox I/O execution (Reply)

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Richard
Guest





PostPosted: Sat Nov 22, 2003 2:30 am    Post subject: Synchonizing EditBox I/O execution (Reply) Reply with quote



NOTE:
-----
I do not seem to be able to "reply" so that all
back and forth communication falls under the same posting.
In this last attempt, the mail administrator bounced back the reply.
If you could instruct me as to the correct manner for replying,
that would be a great help.

(PS: I checked out the web sites for searching for FAQ. Thanks.)
ROK
----------------------------------

I guess that I should not have even mentioned dialog windows; they really
have nothing specifically to do with my question. They were just an example
of how the OS handles their I/O request before moving on to subsequent code.

I thought that I was helping out the situation by not muddying the waters
with unnecessary code, but here is an example of what I want to do.

(code is within a button's "OnClick" handler)
int x = 1; // (leading code)

MyEditBox->Visible=true;
MyEditBox->SetFocus(); // Now I want the OS to allow me to enter NEW
data.
// Not just act upon what WAS THERE.
// Obviously, then, part of the problem
// (if the 1st part is possible) is how to
tell
// the OS that I am now finished entering data
and
// control should now revert back to this
portion of the code and
// handle the "if()" statement which uses the
newly
// entered data in the edit box.

if(MyEditBox->Text = "quit") return;
int y = 2; // (following code)


PS: "George" Suggested using "OnExit" as a possible solution to part 2 of my
question.
But an OnExit handler defines what to do when an "exit" has been
accomplished. What I need to know is HOW to exit.




Back to top
Timothy H. Buchman
Guest





PostPosted: Sat Nov 22, 2003 2:45 am    Post subject: Re: Synchonizing EditBox I/O execution (Reply) Reply with quote



"Richard" <pacenita (AT) cox (DOT) net> wrote

Quote:
In this last attempt, the mail administrator bounced back the reply.
If you could instruct me as to the correct manner for replying,
that would be a great help.

What sort of newsreader program are you using? Are you using a
web-based interface?

Quote:
I guess that I should not have even mentioned dialog windows; they
really
have nothing specifically to do with my question. They were just an
example
of how the OS handles their I/O request before moving on to
subsequent code.


It appears that you are asking a general question about Windows
programming as an event-driven structure. Have you written Windows
programs with other tools than BCB before? There are a number of good
essays on this topic around, although I don't have a link handy this
instant.

If you think my comment might be correct, your favorite search engine
on "Windows Programming Event Driven" might produce a lot of material.
My point is that BCB isn't unique in this respect. The "Message Box"
model you mention is just like DOS programming, with a pause for
input. Windows programs aren't usually most effective when written
that way.

--
Timothy H. Buchman
========================================
City Center Theater, New York NY
mail address tbuchmanPLEASE(at sign)REMOVEcitycenterD O Torg
Search .borland message archive on http://www.tamaracka.com/search.htm


Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Sat Nov 22, 2003 2:48 am    Post subject: Re: Synchonizing EditBox I/O execution (Reply) Reply with quote




"Richard" <pacenita (AT) cox (DOT) net> wrote


Quote:
I thought that I was helping out the situation by not muddying
the waters with unnecessary code, but here is an example of
what I want to do.

What you ask for is not possible in the manner that you have described it.
You'll have to break up your code into several different methods, ie:

void __fastcall TForm1::Button1Click(TObject *Sender)
{
MyEditBox->Visible = true;
MyEditBox->SetFocus();
}

void __fastcall TForm1::MyEditBoxExit(TObject *Sender)
{
int x = 1;

if( MyEditBox->Text = "quit") return;
int y = 2;
//..
}

Quote:
But an OnExit handler defines what to do when an "exit"
has been accomplished. What I need to know is HOW to exit.

Simply click on something else. The OnExit event is triggered when the Edit
Box loses focus. If you don't want to click manually, you could have the
user press the Enter key after typing in the new text, and then use the
OnKeyPress event to catch the Enter key and execute the new code, ie:

void __fastcall TForm1::MyEditBoxKeyPress(TObject *Sender, char &Key)
{
if( Key == VK_RETURN )
{
Key = 0; // cancel the keystroke

int x = 1;

if( MyEditBox->Text = "quit") return;
int y = 2;
//..
}
}


Gambit



Back to top
JD
Guest





PostPosted: Sat Nov 22, 2003 6:29 am    Post subject: Re: Synchonizing EditBox I/O execution (Reply) Reply with quote


"Richard" <pacenita (AT) cox (DOT) net> wrote:
Quote:
I do not seem to be able to "reply" [...]

I personally don't like using news readers but sometimes you
don't have a choice. Borland groups can be accessed directly
using your favorite browser. Just go to the main page, find
your group and hover the mouse over the one you want.

http://info.borland.com/newsgroups/ng_cbuilder.html

You'll be able to figure out how to alter the address so that
you can get there without the news reader. Then just bookmark
it. This is for this group:

http://newsgroups.borland.com/cgi-bin/dnewsweb?utag=&group=borland.public.cppbuilder.vcl.components.using&from_up=&from_down=74241&cmd_latest=Latest+Items

~ JD


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.