 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ron Eggler @ work Guest
|
Posted: Wed May 18, 2005 7:26 am Post subject: TPageControl |
|
|
Hi,
how do I set the 2nd Register active on Runtime?
I tried:
Main_Frm->PageControl1->ActivePage=dynamic_cast<TTabSheet*>(1);
but doesnot work... because of: "Typecast from int to TTabSheet is not
possible"
Thank you!
|
|
| Back to top |
|
 |
Ron Eggler @ work Guest
|
Posted: Wed May 18, 2005 7:57 am Post subject: Re: TPageControl |
|
|
Hans-Arno Mielsch wrote:
| Quote: | use ActivePageIndex
|
yup, thanks! :)
| Quote: | ActivePage needs a pointer to a TabSheet.
-HAM
"Ron Eggler @ work" <nospam (AT) hotmail (DOT) com> wrote in message
news:428aee35$1 (AT) newsgroups (DOT) borland.com...
Hi,
how do I set the 2nd Register active on Runtime?
I tried:
Main_Frm->PageControl1->ActivePage=dynamic_cast<TTabSheet*>(1);
but doesnot work... because of: "Typecast from int to TTabSheet is
not possible"
Thank you!
|
|
|
| Back to top |
|
 |
Nikoali.Mikuszeit@uam.es Guest
|
Posted: Wed May 18, 2005 5:58 pm Post subject: CustomOpenDialog |
|
|
Hello,
needing a modified SaveDialog, I searched the internet and found a very
nice solution for an OpenDialog by Kent Reisdorph in
bcbjournal.com/articles/vol3/9912/Extending_the_common_dialogs.htm
(Therefore I guess I don't have to put the complete code here.) This is
almost what I need, but for a SaveDialog.
Now the problem:
Just to check if it is working, I made a simple copy and paste. I put the
resource file directly into the project (actually a simpler version, which
was created by ResourceWorkshop s.below). It is compiling and the *.res is
created from the *.rc file, but no dialog window is opening if I use a
command like
TMyOpenDialog* Dialog =
new TMyOpenDialog(this, "DIALOG1");
but it is working in the normal way if I type
TMyOpenDialog* Dialog =
new TMyOpenDialog(this, "");
as it is expected from the definition
TMyOpenDialog::TMyOpenDialog(
TComponent* AOwner, char* TemplateName)
: TOpenDialog(AOwner)
{
if (strlen(TemplateName) != 0)
Template = TemplateName;
else
Template = NULL;
}
The class definition of TMyOpenDialog is in Unit1.h and the project only
contains Unit1.cpp,Project1.cpp and Dialogs.rc and Dialog.rc reads
DIALOG1 DIALOG 0, 0, 161, 114
STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_SYSMENU
FONT 8, "MS Sans Serif"
{
CONTROL "Checkbox", 101, "button", BS_AUTOCHECKBOX | WS_CHILD |
WS_VISIBLE | WS_TABSTOP, 8, 92, 60, 12
CONTROL "Text", 102, "BorStatic", SS_LEFT | WS_CHILD | WS_VISIBLE |
WS_GROUP, 10, 81, 16, 8
}
DIALOG2 DIALOG 0, 0, 161, 114
STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_SYSMENU
FONT 8, "MS Sans Serif"
{
CONTROL "Checkbox", 101, "button", BS_AUTOCHECKBOX | WS_CHILD |
WS_VISIBLE | WS_TABSTOP, 8, 92, 60, 12
CONTROL "Text", 102, "BorStatic", SS_LEFT | WS_CHILD | WS_VISIBLE |
WS_GROUP, 10, 81, 16, 8
}
Now I dont't know, if there is a general problem, a problem in compiling
the *.rc within the project or in the *.rc itself.
Can anybody do something with this *poor* amount of information? That
would be wonderful. An example source code (complete and running) would be
nice. Actually it's said in the article, that ist is possible to download
the sourcecode at www.bridgespublishing.com, but the only thing you can
download there are family photos.
Thank you and
best regards
Nikolai
|
|
| Back to top |
|
 |
David Erbas-White Guest
|
Posted: Wed May 18, 2005 6:45 pm Post subject: Re: CustomOpenDialog |
|
|
[email]Nikoali.Mikuszeit (AT) uam (DOT) es[/email] wrote:
| Quote: |
Can anybody do something with this *poor* amount of information? That
would be wonderful. An example source code (complete and running) would
be nice. Actually it's said in the article, that ist is possible to
download the sourcecode at www.bridgespublishing.com, but the only
thing you can download there are family photos.
Thank you and
best regards
Nikolai
|
http://www.cppbuilderdevjournal.com/articles/source/December99Code.zip
David Erbas-White
|
|
| Back to top |
|
 |
Nikoali.Mikuszeit@uam.es Guest
|
Posted: Thu May 19, 2005 9:52 am Post subject: Re: CustomOpenDialog |
|
|
Thank you David, this code is running. I have to ckeck where this version
differs from mine.
Just a question of manners. In my browser it seems that I posted into
another topic. To all, sorry for that, was my first one...think I figured
out how to start a new thread (I hope...)
|
|
| Back to top |
|
 |
|
|
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
|
|