xBrowse display problem on a DIALOG

xBrowse display problem on a DIALOG

Postby anserkk » 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

Code: Select all  Expand view
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)

Image
[URL=http://g.imageshack.us/img151/d


If I change the above code to a Window instead of Dialog, then it is working fine

Code: Select all  Expand view
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


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

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

Regards

Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: xBrowse display problem on a DIALOG

Postby Enrico Maria Giordano » Mon Sep 15, 2008 3:04 pm

Try to reduce the browse height to fit the dialog.

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

Postby nageswaragunupudi » Mon Sep 15, 2008 3:08 pm

Change the code for activating dialog as :

Code: Select all  Expand view
   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
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby anserkk » Tue Sep 16, 2008 5: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
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Postby anserkk » Tue Sep 16, 2008 5: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

Code: Select all  Expand view
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() )
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 74 guests