FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Inactive xBrowse on Main Windows
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Inactive xBrowse on Main Windows
Posted: Fri Jul 31, 2009 11:57 AM

Dear All,

I create Main Windows and xBrowse. The problem is xBrowse on Main Windows is not active. It cannot click, scroll and any action but refresh() is still working.

Why I put xBrowse to main windows, because it is interface program. It is waiting for the record and automatic action some routine by loop (timer()).

What do I make mistake?

Regards,
Dutch

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Inactive xBrowse on Main Windows
Posted: Fri Jul 31, 2009 12:16 PM
Main Windows and xBrowse

Do you mean XBrowse on MDI Main window ?
To my knowledge no controls work on MDI main window.
If there is a way I am also very much interested to know.
Regards



G. N. Rao.

Hyderabad, India
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Inactive xBrowse on Main Windows
Posted: Fri Jul 31, 2009 01:40 PM
I agree with Rao,

it works only with a little help from a Dialog :



I wanted to calculate the Browse-Width and Hight with using
oDlg0:nHeight and oDlg0:nWidth,
but it didn't work and I had to find out the Bottom (-133) - and Right-Border (-12) for the Browser,
for Dialog-Adjustment. Maybe it is possible with a Calculation ?
Code (fw): Select all Collapse
DEFINE WINDOW  oWnd  TITLE "xBROWSE - Colorselection"  MDI   MENU TMenu():New() 

ACTIVATE WINDOW oWnd MAXIMIZED ;
ON INIT xBRW(oWnd) 

// ------------------------------

FUNCTION xBRW(oWnd)
LOCAL oDlg0, oBrw

nMainStyle = nOR( WS_OVERLAPPED | WS_VISIBLE )

DEFINE DIALOG oDlg0  FROM 50, 50 TO 280, 200 OF oWnd STYLE nMainStyle PIXEL 

oBrw  := TXBrowse():new( oDlg0 )

WITH OBJECT oBrw

      :nTop      := 0
      :nLeft     := 0
      :nBottom   := oDlg0:nHeight - 133
      :nRight    := oDlg0:nWidth - 12
      :SetArray( aBRCOLOR, .f. )

END

SetBrwStyle( oBrw )
oBrw:CreateFromCode()

ACTIVATE DIALOG oDlg0 NOWAIT ;
ON INIT oDlg0:Move( 50, 50, 280, 200, .f. )

RETURN NIL


Best Regards
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.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Inactive xBrowse on Main Windows
Posted: Fri Jul 31, 2009 04:33 PM

Mr Uwe

Thanks for the lead.
But this solution has problem. Child windows get created behind the dialog.
We need the xbrowse on the frame like the background, but functional

Regards



G. N. Rao.

Hyderabad, India
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Inactive xBrowse on Main Windows
Posted: Fri Jul 31, 2009 07:08 PM

>Child windows get created behind the dialog.

I believe this is a limitation of MDI. Personally, I do not like MDI.

Consider a SDI design with splitter on a main window and put the main browse on one side and the others on the other side. This way the user doesn't have to move windows around.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Re: Inactive xBrowse on Main Windows
Posted: Fri Jul 31, 2009 08:05 PM
Hello Dutch:

dutch wrote:I create Main Windows and xBrowse. The problem is xBrowse on Main Windows is not active. It cannot click, scroll and any action but refresh() is still working.


Try by creating the control over oWnd:oWndClient ( not over "oWnd").

Best regards.

Manuel Mercado.
manuelmercado at prodigy dot net dot mx
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Inactive xBrowse on Main Windows
Posted: Fri Jul 31, 2009 11:12 PM

Mr Mercado's suggestion works.
But even this has a few side effects in that the MDI childs do not get painted properly at times and when maximized we cant see the close, resize and minimize buttons, etc.
Basically we should keep in mind that we are trying to do something not intended.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Inactive xBrowse on Main Windows
Posted: Sat Aug 01, 2009 05:36 AM
Dear All,

Thanks for all help&idea, It is true as Rao said but Manuel idea is work well for my solution. Because this screen is work for viewing the interface record.

mmercado wrote:Hello Dutch:

dutch wrote:I create Main Windows and xBrowse. The problem is xBrowse on Main Windows is not active. It cannot click, scroll and any action but refresh() is still working.


Try by creating the control over oWnd:oWndClient ( not over "oWnd").

Best regards.

Manuel Mercado.

Thanks&regards,
Dutch
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)

Continue the discussion