Can I use TXBrowse class from Resource?

User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Can I use TXBrowse class from Resource?

Post 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
User avatar
Armando
Posts: 2479
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Contact:

Post by Armando »

Dutch:

Try using

oBrw:CreateFromResource( 10 ) // 10 is your browse ID

Instead

oBrw:CreateFromCode()

Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

XBrowse from resources

Post 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
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

You should also change wbrowse to xbrowse in the resource file.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post 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
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Post 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 )

kind regards
Stefan
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post 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
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Otto,

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Dutch,

> In xbrowse.ch is not including REDEFINE command.

We are going to implement it asap,
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post 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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

NageswaraRao,

We should better have a REDEFINE XBROWSE ... to avoid confusions
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Post by dutch »

Dear Antonio & nageswaragunupudi & Stefan

Thanks for your valuable help.

Regards,
Dutch
Post Reply