xsharp.eu • Minor problem with bBrowser Column headings
Page 1 of 2

Minor problem with bBrowser Column headings

Posted: Sat Jul 20, 2019 6:59 am
by Anonymous
Hi all, I have a minor, but annoying problem with bBrowser column headings in ONE instance of the bBrowser.I use three bBrowsers in my app,two display properly as shown in the "Column labled correctly" image attached, but the one that is used the most (PostInit and Init code in attached PDF) displays wrongly - see "Columns labled incorrectly" image also attached. Where am I going wrong please?

Minor problem with bBrowser Column headings

Posted: Sat Jul 20, 2019 9:10 am
by ic2
Famous VO Guru Geoff Schaller (he's doing fine btw, I called him 2 weeks ago) would have said:

"Show us some code"

And if you also upload a bigger picture (these are hardly visible) we may be able to see what's wrong.
So please upload the code for the correct and the incorrect bBrowser.

Dick

Dick

Minor problem with bBrowser Column headings

Posted: Sat Jul 20, 2019 9:24 am
by BiggyRat
The code is there in the pdf file...I'm not sure what else I can post. The 2 pictures are fine here. I've uploaded them 4 times.They are both 1661*294 pixels. This site must be shrinking them.
Columns labled incorrectly.JPG
Columns labled incorrectly.JPG (34.31 KiB) Viewed 390 times
Columns labled correctly.JPG
Columns labled correctly.JPG (38.12 KiB) Viewed 390 times

Minor problem with bBrowser Column headings

Posted: Sat Jul 20, 2019 9:37 am
by BiggyRat
Lets try the same files as a zip...

Minor problem with bBrowser Column headings

Posted: Sat Jul 20, 2019 11:38 am
by robert
Jeff,

Your postinit code manipulates SetDateFormat() and SetCentury(). That is global state that you should NOT change when opening a window but usually only once at startup of your app.
I remember a discussion a few weeks ago about date display.
It is this kind of code that can and will cause problems.

W.r.t. the column headers: this bBrowser uses a standard DbServer. This server does not have description captions for the fields. My guess is that the other window uses a Designed server where you have added captions to the fields / fieldspecs.

Robert

Minor problem with bBrowser Column headings

Posted: Sat Jul 20, 2019 12:00 pm
by BiggyRat
Hi Robert, ok, I'll ditch that code, but it's in the other 2 also. This browser was the original bBrower I created. The other two are literal clones of this one. They work, this one doesn't. That's what has me stuffed.

Minor problem with bBrowser Column headings

Posted: Sat Jul 20, 2019 12:40 pm
by lumberjack
Jeff,
BiggyRat wrote:Hi Robert, ok, I'll ditch that code, but it's in the other 2 also. This browser was the original bBrower I created. The other two are literal clones of this one. They work, this one doesn't. That's what has me stuffed.
Are you sure the others that work don't have somewhere a bDataColumn:Caption assignment and this one not?

Minor problem with bBrowser Column headings

Posted: Sat Jul 20, 2019 12:55 pm
by BiggyRat
Yes Sir, absolutely. They all got their column titles from their Fieldspecs. If there's a manual way of doing it, I'm all ears... and eyes! ?

Minor problem with bBrowser Column headings

Posted: Sat Jul 20, 2019 1:00 pm
by lumberjack
BiggyRat wrote:Yes Sir, absolutely. They all got their column titles from their Fieldspecs. If there's a manual way of doing it, I'm all ears... and eyes! ?
The bDataColumns all have a Caption property that you can ACCESS/ASSIGN so no rocket science:

Code: Select all

self:oDCbBrowser1:GetColumn(#JobDate):Caption := "My Job Date Caption"

Minor problem with bBrowser Column headings

Posted: Sat Jul 20, 2019 1:07 pm
by robert
Jeff,
So the difference is that one window has a plain DbServer{} and the others a server where fields have been decorated with FieldSpecs. That is what I already thought and suggested.

Robert