Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Er!k \\/!$$Er" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: Most efficient way to re-arrange bBrowser columns? Date: Fri, 28 Dec 2012 20:01:41 +0100 Lines: 33 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Trace: individual.net pxR6SdNKurX9CKpbkC/7hwoRB91dxFw0eNFQOm2ebTgXTnssNBZBLi66W5rqgRSppy Cancel-Lock: sha1:1I85H3Tv6ntmwCpYcMOzAfJ0wkQ= In-Reply-To: X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 15.4.3555.308 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308 Xref: csiph.com comp.lang.clipper.visual-objects:4526 Hi Dick, I think I would pass the column names in the bBrowser:Use() . That would solve the time consuming moving. Erik "D.J.W. van Kooten" schreef in bericht news:f60rd8dcb4r6ts9mp2eiaj394v5ohpr88b@4ax.com... We store user settings of bBrowser column positions and width. After initializing the bBrowser with the programmed defaults, the code below re-arranges the bBrowser by resizing to the size stored in aCols (read from the setting file) and then move the columns in the order as stored in this array. I found that especially the Move is quite time consuming; it can take 3 seconds. Can anyone recommend a quicker way to re-arrange the columns in a different order? FOR dwIndex := 1 UPTO ALen (aCols) cField := aCols [dwIndex, 1] dwSize := aCols [dwIndex, 3] dwColpos := oBrowser:GetOpenColumnNo (cField) oBrowser:ResizeColumn (dwColpos, dwSize) oBrowser:MoveColumn (dwColpos, 0) // move column behind last column NEXT Dick