FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse display problem on a DIALOG
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
xBrowse display problem on a DIALOG
Posted: Mon Sep 15, 2008 10:46 AM
Friends,

I am experiencing a strange behavior of xBrowse's display update while using the mouse scroll wheel OR Keyboard down arrow key. If I use the vertical scroll bar on the xBrowse to move down, then the display is OK.

I am experiencing this problem only on a DIALOG. If I change it to a window then this problem is not there.

Any idea where I have went wrong ?


My code

DEFINE DIALOG oDlg ;
      TITLE "Account Heads" 

oDlg:nTop:=100      
oDlg:nBottom:=Round(WndMain():nHeight*.80,0)  // 80% of Main Windows Ht
oDlg:nRight:=WndMain():nWidth-20              // 1032 -2 == 1030


 @  0, 0 XBROWSE oBrw LINES CELL;
      COLUMNS 'ACCODE','NAME','GRCODE' ;
      SIZE 370,oDlg:nHeight-35 PIXEL ;
      OF oDlg ;
      ALIAS 'AcMaster_ACM' 

oBrw:CreateFromCode() 
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW  // Row Highlite


ACTIVATE DIALOG oDlg ;
	on INIT oBrw:SetFocus() 
Return NIL


Screen Preview when xBrowse used on a Dialog (result of the above given code)


DEFINE WINDOW oDlg ;
TITLE "Account Heads"

oDlg:nTop:=100
oDlg:nBottom:=Round(WndMain():nHeight*.80,0) // 80% of Main Windows Ht
oDlg:nRight:=WndMain():nWidth-20 // 1032 -2 == 1030


@ 0, 0 XBROWSE oBrw LINES CELL;
COLUMNS 'ACCODE','NAME','GRCODE' ;
SIZE 370,oDlg:nHeight-35 PIXEL ;
OF oDlg ;
ALIAS 'AcMaster_ACM'

oBrw:CreateFromCode()
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW // Row Highlite


ACTIVATE WINDOW oDlg ;
on INIT oBrw:SetFocus()
Return NIL
[/code]

Screen Preview when xBrowse used on a Window (result of the above given code)

[url=http://imageshack.us]

[URL=http://g.imageshack.us/img139/windowgw5.

Regards

Anser
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: xBrowse display problem on a DIALOG
Posted: Mon Sep 15, 2008 03:04 PM

Try to reduce the browse height to fit the dialog.

EMG

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
xBrowse display problem on a DIALOG
Posted: Mon Sep 15, 2008 03:08 PM
Change the code for activating dialog as :

   ACTIVATE DIALOG oDlg ;
      on INIT ( oBrw:nHeight := oDlg:nHeight-35, oBrw:SetFocus() )


Do not use Dialog's height before activating the dialog.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
xBrowse display problem on a DIALOG
Posted: Tue Sep 16, 2008 05:00 AM

Thank you Mr.Nageshwara Rao and Mr.Enrico.

As per your advice, I changed the xBrowse height to a lesser value than the Dialog's height. This solved the problem.

Regards

Anser

Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
xBrowse display problem on a DIALOG
Posted: Tue Sep 16, 2008 05:08 AM
nageswaragunupudi wrote:

Do not use Dialog's height before activating the dialog.


Dear Mr.Nageshware Rao

Do you mean that I should not try to set the nHeight value of a Dialog before activating it. But if I set the values after activating then I find a flickery on the screen.

Is it OK if I set the dialog height values in "ON INIT"

My code

oDlg:nTop:=100      
oDlg:nBottom:=Round(WndMain():nHeight*.80,0)  // 80% of Main Windows Ht
oDlg:nRight:=WndMain():nWidth-20              // 1032 -2 == 1030

ACTIVATE DIALOG oDlg ;
	on INIT ( oBrw:nHeight := oDlg:nHeight-35,oBrw:SetFocus() )

Continue the discussion