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 

slider bar values directly to and editbox or label ??

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





PostPosted: Tue Jun 22, 2004 10:12 am    Post subject: slider bar values directly to and editbox or label ?? Reply with quote



If i have mutliple slider bars is there a way to place an edit box or
label next to them and have the slider values tagged directly into the
edit box or lable for user feedback of the current slider values,
without coding an update routine.

Also TIniFile, when you create an infile during a program, say saving
some values, isnt the default creation directory supposed to be the
directory the exe file is running in?

Mine end up being created in the c:winnt directory (win2000) by
default or should you always explicitly place a directory path in the
name string.


thanks for any help
Back to top
Hans
Guest





PostPosted: Tue Jun 22, 2004 11:51 am    Post subject: Re: slider bar values directly to and editbox or label ?? Reply with quote




<peted (AT) iinet (DOT) net.au> wrote

Quote:
If i have mutliple slider bars is there a way to place an edit box or
label next to them and have the slider values tagged directly into the
edit box or lable for user feedback of the current slider values,
without coding an update routine.

You could create a new component, as decsendant of the sliderbar, and then
add a published member TEdit *EditBox
Then override the OnChange Event and do

OnChangeEvent(TObject *Sender)
{
if(EditBox != 0)
EditBox->Text = IntToStr(Pos);

}

Quote:
Also TIniFile, when you create an infile during a program, say saving
some values, isnt the default creation directory supposed to be the
directory the exe file is running in?

Mine end up being created in the c:winnt directory (win2000) by
default or should you always explicitly place a directory path in the
name string.

Ini files are stored by default in the WIndows directory, because that is
where they were back in the old days, with Windows 3.11. If you want it in
your current directory, you must specify.

Quote:


thanks for any help

You're welcome



Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Tue Jun 22, 2004 5:41 pm    Post subject: Re: slider bar values directly to and editbox or label ?? Reply with quote



<peted (AT) iinet (DOT) net.au> wrote


Quote:
If i have mutliple slider bars is there a way to place an
edit box or label next to them and have the slider values
tagged directly into the edit box or lable for user feedback
of the current slider values, without coding an update routine.

The standard controls do not support that, no. You would have to find a
third-party component (or make your own) in order to do that. Otherwise,
using the slider bar's normal event handler(s) is the only other way. What
you could do, however, is put your edit boxes or labels into an array, and
then set each slider bar's Tag property to the index of the array element
that it should update. Then your event handler could use the Tag of the
triggering slider bar to update the appropriate edit/label that is in the
array.

Quote:
Also TIniFile, when you create an infile during a program, say
saving some values, isnt the default creation directory supposed
to be the directory the exe file is running in?

No. In fact, if you don't specify a full path, the Win32 API will look for
the file relative to the Windows folder instead.

Quote:
Mine end up being created in the c:winnt directory
(win2000) by default

Correct. That is by design, and works that way under all Windows versions.

Quote:
or should you always explicitly place a directory path in the name string.

Yes.


Gambit



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.