Hi, there.
Build 2307 adds new hide/show methods to XbpColumn, maybe this is something that works better than the mechanisms using AddColumn/DelColumn.
Besides, there are several news around the PGDBE.
Build 2.00.2307
Build 2.00.2307
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Build 2.00.2307
Hi,
I have described the best way to hide/show XbpColumn, in the following topic here. It is based on Alaska XbpBrowse and XbpColumn implementations. I suppose and believe that Alaska dev team saw my post and learned from it.
http://bb.donnay-software.com/Donnay/vi ... f=2&t=3211
I have described the best way to hide/show XbpColumn, in the following topic here. It is based on Alaska XbpBrowse and XbpColumn implementations. I suppose and believe that Alaska dev team saw my post and learned from it.
http://bb.donnay-software.com/Donnay/vi ... f=2&t=3211
Best regards,
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Re: Build 2.00.2307
Hi.
This is how I (and, as I believe, lots of others) do it for years in my applications. I don't believe Alaska reimplemented that, because it has issues. I planned to test what they provided next week.
This is how I (and, as I believe, lots of others) do it for years in my applications. I don't believe Alaska reimplemented that, because it has issues. I planned to test what they provided next week.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Build 2.00.2307
This is very interesting. Adding and deleting columns to show and hide was something I didn't like in eXpress++.Build 2307 adds new hide/show methods to XbpColumn, maybe this is something that works better than the mechanisms using AddColumn/DelColumn.
If this works well in build 2307, then I guess I will try it and make it conditional at runtime, based on build number.
I am also interested in any improvements to PGDBE.
I didn't receive any email announcement about this.
The eXpress train is coming - and it has more cars.
Re: Build 2.00.2307
Hi,
What issues does it has?I don't believe Alaska reimplemented that, because it has issues.
Best regards,
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Re: Build 2.00.2307
As I said there are no issues and my solution works fine, you can ask Cris who uses it. And you and nobody else never did (developed) that in your applications.
Alaska solution is different than mine. They recreate the whole browse panel and reposition all remaining visible columns. They also allow to hide/show the left/right frozen columns. My solution reposition only the columns right of the hidden column, so its less time consuming and faster. I don't think that its useful to hide/show frozen columns, but it can be easy adopted for that.
Alaska solution is different than mine. They recreate the whole browse panel and reposition all remaining visible columns. They also allow to hide/show the left/right frozen columns. My solution reposition only the columns right of the hidden column, so its less time consuming and faster. I don't think that its useful to hide/show frozen columns, but it can be easy adopted for that.
Best regards,
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Re: Build 2.00.2307
To me it looks like they're not rebuilding/repainting the complete browse, but only the part right from the to be shown/to be hidden column. The colcount remains the same, the hidden column object is still available and, for instance, returns it's values if you use GetCell() and other stuff. This is difference to the usage of DelColumn() and AddColumn() - the column is just hidden, but it's still there. We also have/had issues with the Add/Del-approach with style aspects and sometimes with fragments of the headings left there when repainting the browse - it took us a huge amount of time to get this going. The new methods don't seem to have any of those problems. Besides, we allowed to hide frozen columns aswell. Why not?
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Build 2.00.2307
I studied the new source code of XbpBrowse(), and hide/show columns works as I described. Since the left part columns from the hidden column remain their old positions, you don't have the effect on the screen that they are repositioned two. But since the whole browse panel (background) is recreated to fit the sizes of the remaining visible columns, all columns have to be set parent to the new browse panel and repositioned again, and the whole browse refreshed with the InvalidateRect() method. The same process is done for showing of hidden columns. There is no problem with this solution, only has to do work with all columns and their background. I think that my solution is more elegant.
Of course, frozen columns may be hidden, why not. This don't change much in the solution, only is the column scrollable or not.
Of course, frozen columns may be hidden, why not. This don't change much in the solution, only is the column scrollable or not.
Best regards,
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Re: Build 2.00.2307
Great!I think that my solution is more elegant.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Build 2.00.2307
I see now how you knew about this but I didn't.
I don't use the Workbench with Xbase++.
I only run it occasionally to check for updates.
I found it on the update manager, but not on their website.
It works just fine, better than my HIDE clause logic in eXpress++.
I'm going to update my DC_XbpColumn() class to use this update when version >= 2307
Here is my test program:
I don't use the Workbench with Xbase++.
I only run it occasionally to check for updates.
I found it on the update manager, but not on their website.
It works just fine, better than my HIDE clause logic in eXpress++.
I'm going to update my DC_XbpColumn() class to use this update when version >= 2307
Here is my test program:
Code: Select all
#INCLUDE "dcdialog.CH"
#INCLUDE "Directry.CH"
// This example shows how to use the new hide() and show() methods of XbpColumn class
// when using Xbase++ build 2307 or later.
FUNCTION Main()
LOCAL GetList[0], oBrowse, aDir, oSayColumns, lHideWriteDate := .f., ;
lHideCreateDate := .f., lHideAccessdate := .f., ;
oWriteDate, oCreateDate, oAccessDate
aDir := Directory()
@ 0,0 DCSAY '#columns:'
@ DCGUI_ROW, DCGUI_COL + 10 DCSAY {||IIF(Valtype(oBrowse)='O',oBrowse:colCount,0)} SIZE 10 ;
FONT '10.Lucida Console' SAYOBJECT oSayColumns
@ 1,0 DCBROWSE oBrowse DATA aDir FONT '10.Lucida Console' SIZE 100,20 HEADLINES 2 FIT
DCBROWSECOL ELEMENT F_NAME HEADER 'File Name' WIDTH 20 PARENT oBrowse
DCBROWSECOL ELEMENT F_SIZE HEADER 'Size' WIDTH 10 PARENT oBrowse
DCBROWSECOL ELEMENT F_WRITE_DATE HEADER 'Write;Date' WIDTH 10 PARENT oBrowse ;
OBJECT oWriteDate
DCBROWSECOL ELEMENT F_WRITE_TIME HEADER 'Write;Time' WIDTH 10 PARENT oBrowse
DCBROWSECOL ELEMENT F_ATTR HEADER 'Attr' WIDTH 5 PARENT oBrowse
DCBROWSECOL ELEMENT F_CREATION_DATE HEADER 'Creation;Date' WIDTH 10 PARENT oBrowse ;
OBJECT oCreateDate
DCBROWSECOL ELEMENT F_CREATION_TIME HEADER 'Creation;Time' WIDTH 10 PARENT oBrowse
DCBROWSECOL ELEMENT F_ACCESS_DATE HEADER 'Access;Date' WIDTH 10 PARENT oBrowse ;
OBJECT oAccessDate
DCBROWSECOL ELEMENT F_ACCESS_TIME HEADER 'Access;Time' WIDTH 10 PARENT oBrowse
@ 22,0 DCPUSHBUTTON CAPTION 'Toggle Write Date' SIZE 15,1.2 ;
ACTION {||lHideWriteDate := !lHideWriteDate, ;
IIF(lHideWriteDate,oWriteDate:hide(),oWriteDate:show()), ;
oSayColumns:refresh()}
@ DCGUI_ROW, DCGUI_COL + 20 DCPUSHBUTTON CAPTION 'Toggle Create Date' SIZE 15,1.2 ;
ACTION {||lHideCreateDate := !lHideCreateDate, ;
IIF(lHideCreateDate,oCreateDate:hide(),oCreateDate:show()), ;
oSayColumns:refresh()}
@ DCGUI_ROW, DCGUI_COL + 20 DCPUSHBUTTON CAPTION 'Toggle Access Date' SIZE 15,1.2 ;
ACTION {||lHideAccessDate := !lHideAccessDate, ;
IIF(lHideAccessDate,oAccessDate:hide(),oAccessDate:show()), ;
oSayColumns:refresh()}
DCREAD GUI FIT TITLE 'Browse Column Hide/Show Test' ;
EVAL {||oSayColumns:refresh()}
RETURN nil
* -----------
PROC appsys ; return
The eXpress train is coming - and it has more cars.