dcbrowse FIT

This forum is for eXpress++ general support.
Post Reply
Message
Author
skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

dcbrowse FIT

#1 Post by skiman »

Hi Roger,

In my application a lot of browses are datadriven. I can't use the FIT clause, because I don't know how much columns the user will define.

Would there be a way to have a DCBROWSE .... FIT MAX 120. So if the calculated width is more than the MAX value, the total width of the browse remains that MAX value.
Best regards,

Chris.
www.aboservice.be

Wolfgang Ciriack
Posts: 484
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: dcbrowse FIT

#2 Post by Wolfgang Ciriack »

That would be a very valuable function for me, too.
_______________________
Best Regards
Wolfgang

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

Re: dcbrowse FIT

#3 Post by rdonnay »

Your wish is my command parameter :angelic-blueglow:

Here it is.
Attachments
MaxFit.zip
(152.94 KiB) Downloaded 800 times
The eXpress train is coming - and it has more cars.

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: dcbrowse FIT

#4 Post by skiman »

Roger,

Yes, works as expected. Thanks for this quick addition.

I implemented it in my own browse class, I had to change the following in _dcgetbx.prg:
IF !Empty(oParent:fitMax) .AND. nWidth > oParent:fitMax*::colPixels
nWidth := oParent:fitMax*::colPixels
ENDIF

Without the colpixels the maximum width was in pixels. I don't know if this is needed in the standard version.
Best regards,

Chris.
www.aboservice.be

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: dcbrowse FIT

#5 Post by skiman »

Hi Roger,

I released a new version of my application with the dcbrowse FIT MAX implemented, and it seems as there is a problem.

The horizontal scrollbar isn't working anymore with this clause. I have a DCBROWSE with the following

Code: Select all

 @ 0,0 DCBROWSE oBrowse ALIAS 'bon1' SIZE 115,21 FIT MAX 115 ;
                      USEVISUALSTYLE ;
                      CURSORMODE XBPBRW_CURSOR_ROW PARENT oStatic FREEZELEFT { 1,2} ...
Without the FIT MAX 115 the horizontal scrollbar is working. With the FIT MAX the max width is 115, but I can't scroll to the right columns.
Best regards,

Chris.
www.aboservice.be

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

Re: dcbrowse FIT

#6 Post by rdonnay »

Without the FIT MAX 115 the horizontal scrollbar is working. With the FIT MAX the max width is 115, but I can't scroll to the right columns.
This must be due to your FREEZELEFT clause.
Frozen columns do not have a horizontal scrollbar.
The eXpress train is coming - and it has more cars.

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: dcbrowse FIT

#7 Post by skiman »

Hi Roger,

The frozen columns don't have a horizontal scrollbar, they never had. The columns at the right of the frozen columns have the scrollbar. This is as expected.

Without the FIT MAX this scrollbar is working, even with FREEZE LEFT. When using the FIT MAX, these scrollbar isn't working anymore.
Best regards,

Chris.
www.aboservice.be

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

Re: dcbrowse FIT

#8 Post by rdonnay »

My test program works as expected.

Can you give me a test program that doesn't work?
The eXpress train is coming - and it has more cars.

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: dcbrowse FIT

#9 Post by skiman »

Hi Roger,

It is working in a test program I just tried, it doesn't work in my application. :think:

I will check my code again within a few days. I suppose I overlook it now.
Best regards,

Chris.
www.aboservice.be

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: dcbrowse FIT

#10 Post by skiman »

Hi,

The max is working correctly. I finally found the cause of my problem.

The parent of my browse is oStatic. And yes, I forgot to adjust the size of this static. :oops:
Best regards,

Chris.
www.aboservice.be

Post Reply