Bug in TXBrowse?

Bug in TXBrowse?

Postby Enrico Maria Giordano » Wed Jun 29, 2016 1:53 pm

Please look at these two samples.

PRG 1:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    DEFINE DIALOG oDlg;
           RESOURCE "TEST"

    REDEFINE BUTTON;
             ID 201 OF oDlg

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


RC 1:

Code: Select all  Expand view
TEST DIALOG 0, 0, 300, 300
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Test"
FONT 12, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
 CONTROL "Test", 201, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 20, 265, 41, 16
}


PRG 2:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL oBrw

    DEFINE DIALOG oDlg;
           RESOURCE "TEST"

    REDEFINE XBROWSE oBrw;
             ID 101 OF oDlg

    ( oBrw )

    REDEFINE BUTTON;
             ID 201 OF oDlg

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


RC 2:

Code: Select all  Expand view
TEST DIALOG 0, 0, 300, 300
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Test"
FONT 12, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
 CONTROL "Test", 201, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 20, 265, 41, 16
 CONTROL "", 101, "TXBrowse", WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 10, 10, 275, 245
}


The second sample doesn't honour the font size defined in the RC file. It looks like the presence of TXBrowse prevents it.

Any workaround?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TXBrowse?

Postby Enrico Maria Giordano » Wed Jun 29, 2016 10:11 pm

Just to further explain the problem, this sample using TWBrowse works fine instead:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL oBrw

    DEFINE DIALOG oDlg;
           RESOURCE "TEST"

    REDEFINE LISTBOX oBrw FIELDS;
             ID 101 OF oDlg

    ( oBrw )

    REDEFINE BUTTON;
             ID 201 OF oDlg

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


Code: Select all  Expand view
TEST DIALOG 0, 0, 300, 300
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Test"
FONT 12, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
 CONTROL "Test", 201, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 20, 265, 41, 16
 CONTROL "", 101, "TWBrowse", WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 10, 10, 275, 245
}


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Re: Bug in TXBrowse?

Postby Silvio.Falconi » Fri Jul 01, 2016 9:15 am

I think it need
oBrw:CreateFromCode() or CreateFromResource( nId )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

Re: Bug in TXBrowse?

Postby Enrico Maria Giordano » Fri Jul 01, 2016 9:19 am

With oBrw:CreateFromCode() I get the following error:

Code: Select all  Expand view
Error description: Error FiveWin/2  Duplicated Id: No:    101


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TXBrowse?

Postby Silvio.Falconi » Fri Jul 01, 2016 9:23 am

Image
here run ok
wich is the problem ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

Re: Bug in TXBrowse?

Postby Silvio.Falconi » Fri Jul 01, 2016 9:24 am

CreateFromResource( 101 )
run also without

I tried also with
CONTROL "", 200, "TxBrowse", WS_TABSTOP|0x00a00000, 12, 8, 178, 96
Last edited by Silvio.Falconi on Fri Jul 01, 2016 9:31 am, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

Re: Bug in TXBrowse?

Postby Enrico Maria Giordano » Fri Jul 01, 2016 9:30 am

Please look at the font of the button. It should be size 12.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TXBrowse?

Postby nageswaragunupudi » Fri Jul 01, 2016 9:39 am

Mr Enrico

We shall look into this and get back to you.
At the same I am surprised that you even touched XBrowse. :-)
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Bug in TXBrowse?

Postby Enrico Maria Giordano » Fri Jul 01, 2016 9:52 am

nageswaragunupudi wrote:Mr Enrico

We shall look into this and get back to you.


Thank you.

nageswaragunupudi wrote:At the same I am surprised that you even touched XBrowse. :-)


Why?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TXBrowse?

Postby Enrico Maria Giordano » Fri Jul 01, 2016 3:18 pm

And while you are looking at it, what is that "A" on the header?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TXBrowse?

Postby Silvio.Falconi » Sat Jul 02, 2016 6:56 am

it create an array init from A as default
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm



Re: Bug in TXBrowse?

Postby Enrico Maria Giordano » Sat Jul 16, 2016 11:28 am

Rao, please, I need a workaround to this problem. :-)

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 97 guests