Page 1 of 2
Can I use TXBrowse class from Resource?
Posted: Sun Feb 17, 2008 6:15 pm
by dutch
I'm very impress with TXBrowse but I've used TWbrowse from Resource?
How can I replace TWbrowse from resource with TXBrowse?
If it's possible, could I have an example pls.
Regards,
Dutch
Posted: Sun Feb 17, 2008 6:43 pm
by Armando
Dutch:
Try using
oBrw:CreateFromResource( 10 ) // 10 is your browse ID
Instead
oBrw:CreateFromCode()
Regards
XBrowse from resources
Posted: Mon Feb 18, 2008 1:41 am
by ukoenig
Hello Dutch,
I see, you are changing from TW / TC-Browse
to xBrowse.
You can have a look at the topic DB-Tools.
It is a nice sample, what you can do.
In the moment, it is a little bit to early,
to put the source in the forum, because
it is still a lot to do.
It might give you a overview of the handling.
Greetings from germany
Uwe
Posted: Mon Feb 18, 2008 9:09 am
by nageswaragunupudi
You should also change wbrowse to xbrowse in the resource file.
Posted: Mon Feb 18, 2008 9:35 am
by Otto
Hello NageswaraRao,
would you be so kind to post a little rc- and prg-file with a demo for
fwcodesnips.com.
Thanks in advance
Otto
Posted: Mon Feb 18, 2008 9:57 am
by StefanHaupt
Hello Otto,
here is a small rc and prg sample
Code: Select all
Test DIALOG DISCARDABLE 39, 40, 429, 272
STYLE WS_POPUP|WS_CAPTION|WS_SYSMENU
CAPTION "Test"
FONT 8, "Verdana"
BEGIN
CONTROL "", 110, "TOutLook2003", 0x00800000, 3, 4, 111, 250
CONTROL "Exit", 1001, "Button", WS_TABSTOP, 381, 234, 45, 20
CONTROL "", 1000, "msctls_progress32", 0x00000000, 120, 238, 255, 16
CONTROL "", 5000, "TXBrowse", WS_TABSTOP, 120, 6, 306, 224
END
Code: Select all
DEFINE DIALOG oDlg RESOURCE "Test"
....
::oBrw := TXBrowse():New( oDlg )
....
::oBrw:CreateFromResource( 5000 )
Posted: Mon Feb 18, 2008 10:34 am
by Otto
Hello Stefan,
Thank you.
BTW, do you know how I could extend the VSX resource editor that I can select "TXBrowse"?
At the moment I can use copy and paste from a other project.
But it is not elegant.
Regards,
Otto
Posted: Mon Feb 18, 2008 10:40 am
by dutch
Dear StefanHaupt,
Thanks, I've got it.
Dear Antonio,
In xbrowse.ch is not including REDEFINE command.
Have you done the transalator command for REDEFINE? or I have to do by ourselve.
Thanks&Regards,
Dutch
Posted: Mon Feb 18, 2008 11:35 am
by Antonio Linares
Otto,
Posted: Mon Feb 18, 2008 11:36 am
by Antonio Linares
Dutch,
> In xbrowse.ch is not including REDEFINE command.
We are going to implement it asap,
Posted: Mon Feb 18, 2008 12:55 pm
by Otto
Thank you, Antonio,
I am surprised you can do this without adding a own control to the TOOLBOX.
Great. Are you using VSX much?
Regards,
Otto
Posted: Mon Feb 18, 2008 1:10 pm
by Antonio Linares
Otto,
>
I am surprised you can do this without adding a own control to the TOOLBOX.
>
You can do the same using Borland resources workshop
> Are you using VSX much ?
Sometimes, to learn how to use it.
Posted: Mon Feb 18, 2008 1:12 pm
by nageswaragunupudi
dutch wrote:Dear StefanHaupt,
In xbrowse.ch is not including REDEFINE command.
Have you done the transalator command for REDEFINE? or I have to do by ourselve.
Dutch
Actually you can use the same command for resources also like this:
Code: Select all
@ 0,0 XBROWSE FIELDS <fileds> HEADERS <headers,...> PIXEL OF oDllg ALIAS <alias>
< your other code for other xbrowse set up if any >
oBrw:CreateFromResource( <ID> ) // instead of oBrw:CreateFromCode()
// do not use oDlg:oClient := oBrw
ACTIVATE DIALOG oDlg CETNERED
When you use oBrw:CreateFromResource( <ID> ) the @ <row>,<col> are ignored. You have to use CreateFromResource( <ID> ) after all your other code speicifications for your xbrowse.
Posted: Mon Feb 18, 2008 1:13 pm
by Antonio Linares
NageswaraRao,
We should better have a REDEFINE XBROWSE ... to avoid confusions
Posted: Mon Feb 18, 2008 2:15 pm
by dutch
Dear Antonio & nageswaragunupudi & Stefan
Thanks for your valuable help.
Regards,
Dutch