DCBROWSE refresh SIZE

This forum is for eXpress++ general support.
Post Reply
Message
Author
Victorio
Posts: 631
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

DCBROWSE refresh SIZE

#1 Post by Victorio »

Hi,
Please, how to refresh size of DCBROWSE if I change it after creating ?
I have DCBROWSE .... SIZE x,y

in toolbar I have changing button (zoom) which changing y for example from 200 to 400.
using oBrowse:RefreshAll() i tried...., same the DC_getrefresh()

here is little sample
@pozypa,10 DCBROWSE oBrowsepa ALIAS "CPARCELY" ;
SIZE rozxpa,rozypa PIXEL ;
NOSOFTTRACK ;
SCOPE ;
OPTIMIZE ;
CURSORMODE XBPBRW_CURSOR_ROW ;
ITEMMARKED {||Eval(bVLA),Eval(bSTA),;
DC_GetRefresh(GetList,, ;
DCGETREFRESH_TYPE_EXCLUDE,(GETLIST_BROWSE))} ;
SCROLLBARHEIGHT 12 ;
PRESENTATION aBrowPres
...
TOOLBAR :
* Zoom
DCADDBUTTON CAPTION {||cCaptionzoom} PARENT oToolbar1 ;
ACTION {||tone(1000,1),cCaptionzoom:=zoompa(),oBrowsepa:RefreshAll(), ;
oBrowsevl:RefreshAll(),oBrowsecs:RefreshAll(),;
oBrowsepa:forcestable(),oBrowsepa:refreshCurrent(),;
DC_GetRefresh(GetList) ;
}

DCREAD GUI ;
OPTIONS GetOptions ;
MODAL ;
EVAL {|o|SetAppFocus(oBrowsepa:GetColumn(1))}

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCBROWSE refresh SIZE

#2 Post by rdonnay »

I really don't understand your question.
Are you saying that the browse rows don't refresh after zooming?
What is causing the zooming? Is it zoompa() ?

Code: Select all

DCADDBUTTON CAPTION {||cCaptionzoom} PARENT oToolbar1 ;
 ACTION {||tone(1000,1), ;
              cCaptionzoom:=zoompa(), ;
              oBrowsepa:RefreshAll(), ;          <<<<< this should refresh the oBrowsepa browse
              oBrowsevl:RefreshAll(), ;
              oBrowsecs:RefreshAll(),;
              oBrowsepa:forcestable(), ;         <<<<< you don't need this
              oBrowsepa:refreshCurrent(),;     <<<<< you don't need this
              DC_GetRefresh(GetList) ;           <<<<< you don't need this
}
The eXpress train is coming - and it has more cars.

Victorio
Posts: 631
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: DCBROWSE refresh SIZE

#3 Post by Victorio »

browse rows refresh, but size of table is still same.
I tried HIDE, WHEN, it works , but change size not.
I will try something today, maybe I do it.

Function zoompa() only change variable Y for SIZE . (SIZE X,Y for DCBROWSE) resp. variable "rozypa"
If I click Zoom, Y change from 200 to 600 for example , and second click from 600 to 200.
Zoompa also return name for Button (ZOOM-ON, ZOOM-OFF) for cCaption.

Zdeno Bielik
Posts: 147
Joined: Thu Jan 28, 2010 9:24 am
Location: Nitra, Slovakia
Contact:

Re: DCBROWSE refresh SIZE

#4 Post by Zdeno Bielik »

Hi Viktor,

try something like this:

x := oBrowse:currentPos()[1], ;
y := oBrowse:currentPos()[2], ;
oBrowse:Hide(), ;
; && oBrowse:SetSize( { x/2, y/2} ), ; && half size
oBrowse:SetSize( { 400, 200 } ), ;
oBrowse:Configure(), ;
oBrowse:Show(), ;

HTH
Zdeno

Zdeno Bielik
Posts: 147
Joined: Thu Jan 28, 2010 9:24 am
Location: Nitra, Slovakia
Contact:

Re: DCBROWSE refresh SIZE

#5 Post by Zdeno Bielik »

ooops,

actual positions
x := oBrowse:currentPos()[1], ;
y := oBrowse:currentPos()[2], ;

actual sizes
x := oBrowse:currentSize()[1], ;
y := oBrowse:currentSize()[2], ;

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCBROWSE refresh SIZE

#6 Post by rdonnay »

Zeno gave you the correct solution.
The eXpress train is coming - and it has more cars.

Victorio
Posts: 631
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: DCBROWSE refresh SIZE

#7 Post by Victorio »

Zdeno Bielik : thanks/ďakujem

rdonnay, Zdeno Bielik : actually I modifying my source, (have some problems with switching to default position and size) but will be ok, table size is changing correctly.

Post Reply