Newbie Question Installing Bbrowser

We encourage new members to introduce themselves here. Get to know one another and share your interests.
Post Reply
User avatar
Kuno Egger
Posts: 13
Joined: Tue Feb 27, 2018 3:58 am

Newbie Question Installing Bbrowser

Post by Kuno Egger »

.

.
I got VOXPorter to move my app into XIDE and now the first thing the compiler wants to see is bBrowser. So I bought the bBrowser.NET 4 upgrade online and installed it. But I can't seem to find any instructions on how to include bBrowser in my X-Sharp app. I copied the "bBrowser.NET 4 (XSharp Edition)" folder into my project folder but there are no further instructions after that.

Any advice would be greatly appreciated.

Kuno
ic2
Posts: 1798
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Newbie Question Installing Bbrowser

Post by ic2 »

Hello Kuno,

I am not using bBrowser in X#, only in VO projects, but I assume it won't differ too much from VO. For VO there are many full working examples included, aren't those somewhere in a directory (like in my VO directory C:cavo29bBrowserSamples)?

Below is an example of a 2 column bBrowser + an icon using an array server (you can use a DBF just as easy). SetCaptions basically sets the columns, width, alignment; columns as follows:
...
LOCAL oColumn AS bDataColumn
oColumn :=SELF:GetColumn(cFieldname)
oColumn:Caption:=cCaption


and DisplayTheColumns nothing more than:

METHOD DisplayTheColumns(aFields) CLASS IC2bDataBrowser
SELF:Clear(FALSE)
SELF:OpenColumn(AFields)
RETURN nil

If you need more code (like the SetIcons called below, exporting a whole bBrowser to Excel with 1 method and more) just drop me a mail.

Dick

METHOD DefineDocBrowser CLASS DocLinks2
LOCAL aSymFields AS ARRAY
LOCAL aSymLogicFields AS ARRAY
LOCAL oOwner AS OBJECT
LOCAL oImageOk,oImageNotOk
LOCAL ob AS CODEBLOCK

oImageOk := bIcon {OK {}, 16} // Green V
oImageNotOk := bIcon {NotOk {}, 16} // Red cross


SELF:aData:={}
SELF:FillDocsArrays() // Fills array from arrayserver to display plain text from rtf control : uses RIGHTS to show or not show txtobject
aSymFields:={#Doc,#Pad}
aSymLogicFields:={#Doc,#Pad}

SELF:oDCbBrowser:Use(SELF:oAServer,aSymFields)
oOwner:=SELF:Owner
SELF:oDCbBrowser:SetCaptions(aSymLogicFields,{;
{"Document",200},;
{"Path",300},;
},"L",TRUE)

ob:={|Server,Icon1,Icon2| IIF(Server:Present, Icon1, Icon2)}
SELF:oDCbBrowser:DisplayTheColumns(aSymLogicFields)
SELF:oDCbBrowser:SetIcons(ob,1,oImageOk,oImageNotOk) // This should be AFTER DisplayTheColumn
RETURN NIL
User avatar
Kuno Egger
Posts: 13
Joined: Tue Feb 27, 2018 3:58 am

Newbie Question Installing Bbrowser

Post by Kuno Egger »

Yes, I have been using bBrowser extensively in VO for a very long time. It was just a matter of pointing at the bBrowser library. It appears it's not so easy in X-Sharp.

Kuno
User avatar
wriedmann
Posts: 3644
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Newbie Question Installing Bbrowser

Post by wriedmann »

Hi Kuno,
copying the DLLs into you application directory is one possibility - the other is to change the references location for the bBrowser libraries.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Newbie Question Installing Bbrowser

Post by Chris »

Hi Kuno,

It's actually more or less the same thing as in VO, you need to add the bBrowser libraries to your app, except for in .Net this is called "adding references", but it is the same thing. To do this:

Open the app properties (F12 or from the menu Application->Properties), go to the "References" page, locate the bBrowser references in the list and double click on them. In case they are not registered in the GAC, just go to the "Browse" page, click the browse button and pick the bBrowser dlls from the location on disk where they are installed (typically in <Program files>bBrowser).

Please do not hesitate to ask for any other info!
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
User avatar
Kuno Egger
Posts: 13
Joined: Tue Feb 27, 2018 3:58 am

Newbie Question Installing Bbrowser

Post by Kuno Egger »

Hi Chris,

Thank you for pointing me in the right direction. The DLL's were also neatly camouflaged in a folder called Assemblies. Silly me, I kept looking for them in a folder called bBrowser.NET 4. Hint for the veterans: a few simple instructions can save a newbie many hours.

Thanks again,

Kuno
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Newbie Question Installing Bbrowser

Post by Chris »

Hi Kuno,

You're welcome! Yeah, there's some time needed to get used to the new terminology and new concepts in .Net, I remember it had taken me quite some time to understand the difference between assemblies/references and namespaces... Btw, "Assembly" in .Net is a very common term and it refers to any .exe or .dll (using .Net) file
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
User avatar
Kuno Egger
Posts: 13
Joined: Tue Feb 27, 2018 3:58 am

Newbie Question Installing Bbrowser

Post by Kuno Egger »

Thanks Chris!

Kuno
Post Reply