Results 1 to 12 of 12

Thread: Component for building boolean logic

  1. #1

    Thread Starter
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,872

    Component for building boolean logic

    Does anyone know of an existing visual component for creating Boolean Logical conditions?
    Or has an idea how to create an usercontrol like this.

    It's kind of hierarchical structure like a tree control, but with another representation and the ability to drag and drop nodes in/on it. (like a JQuery stackpanel).

    It's main function is not limited to creating SQL queries, but all kind of Boolean Logical Expressions

    It's for conditions like:
    Code:
    A OR B
    A AND B
    A OR (B AND C)
    ((A OR (B AND (C OR D))) AND E)
    Where A, B, C, D, E can be something like A: A' > 35 or A: A' IN (1,3,5,9)

    For some visual ideas have a look here:
    http://ux.stackexchange.com/question...-boolean-logic
    http://redquerybuilder.appspot.com/
    http://mistic100.github.io/jQuery-QueryBuilder/
    http://stackoverflow.com/questions/1...a-web-form-gui

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Component for building boolean logic

    Not sure if Boolean Expression Calculator is what you are looking for?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  3. #3

    Thread Starter
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,872

    Re: Component for building boolean logic

    Thanks for the link Nightwalker.
    But I'm not looking for a method to evaluate a boolean expression, but a visual component which can be used by end users to create/build a boolean expression.

  4. #4
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Component for building boolean logic

    Seems that there are a lot for languages such as Java and some for .Net but I am yet to see one written in VB6.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  5. #5
    New Member KirChhOff's Avatar
    Join Date
    Dec 2014
    Posts
    6

    Re: Component for building boolean logic

    You need to make a programm to do the logical calculations in it or did i get it wrong?

  6. #6
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Component for building boolean logic

    Quote Originally Posted by KirChhOff View Post
    You need to make a programm to do the logical calculations in it or did i get it wrong?
    From post #3

    Quote Originally Posted by Arnoutdv View Post
    Thanks for the link Nightwalker.
    But I'm not looking for a method to evaluate a boolean expression, but a visual component which can be used by end users to create/build a boolean expression.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  7. #7

    Thread Starter
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,872

    Re: Component for building boolean logic

    Something like the attached image
    Attached Images Attached Images  

  8. #8
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Component for building boolean logic

    Why not have a go at coding your own? It beats waiting for a component that may or may not exist.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  9. #9

    Thread Starter
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,872

    Re: Component for building boolean logic

    Of course that can be an option.
    But the company I work for rather spends some money on existing components than using our resources to create them ourselves.
    On the other hand if such a component doesn't exist then we to go for some other route.

  10. #10
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Component for building boolean logic

    Quote Originally Posted by Arnoutdv View Post
    Of course that can be an option.
    But the company I work for rather spends some money on existing components than using our resources to create them ourselves.
    On the other hand if such a component doesn't exist then we to go for some other route.
    Ah! I was thinking it was a personal request.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  11. #11
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,219

    Re: Component for building boolean logic

    Quote Originally Posted by Arnoutdv View Post
    Does anyone know of an existing visual component for creating Boolean Logical conditions?
    Or has an idea how to create an usercontrol like this.
    If you look at your 3rd link again (which I find the nicest and clearest one):
    http://mistic100.github.io/jQuery-Qu...emo-basic.html

    You see, that you will need two usercontrols - one for the Groups (dynamically sizing itself, managing its Children) - and
    one for the Rules-in-a-Group (a simple Stripe, containing the needed DropDowns and Value-Fields which change with the Field-Type).

    It 's a hierarchical thing - and you might be surprised that in the end you will not need all those
    many lines in those two Controls.

    But why not use the existing jQuery-Project from your 3rd link above?
    It comes under a liberal MIT-licenese - and in case this is meant for machines from Vista onwards,
    you can run these existing js-Libs within a Browser-Control (instead of your own invented UserControl).

    The MS-BrowserControls are "usable again" since Version 9, and since the Lib above is based on
    jQuery - most of the "quirks" of different Browser-Versions should be already taken care of.

    E.g.recently i 've successfully removed an older HTML-Editor-OCX from an Application, in favour of
    a (BrowserControl-based) JavaScript-lib (CKEditor) - which interacts with an AppProcess-internal
    WebServer (the one from the RC5) over the loopback (127.0.0.1).

    But the above jQuery-based Builder-Lib might work sufficiently well also when addressed directly from a
    resource-folder in your App.Path (without needing any InProcess-Webserver, I'd test that first).


    But as said, writing your own isn't all that hard - I've just posted a decent Demo which
    covers the Basics (in analogy to the jQuery-example above) into the Code-Bank.
    (it already does the nested Tree-Rendering, adding, removing, MouseHover + MouseWheel-based
    Scrolling when the Widgets run out of Space of their Root-Container - so the heavy lifting
    with regards to the graphics-rendering is already "out of the way")...

    Here's what it looks like


    As said further above - it covers the topic with only two Widgets:
    - cwQueryGroup (about 160 lines of code - this is the red-bordered Widget with the Buttons)
    - cwQueryRule (about 70 lines of code - this is the "Stripe-Widget" with the green Border)

    What remains is now only the introducion of 2 cwDropDown-Widgets (one for the FieldNames
    and one for the logic-Operators) - and a Handler-Widget for the comparison-value -
    which in the simplest case could be a cwTextBox) - the Demo as it currently is needs only
    the RC5 - the just mentioned additional Widgets for the Field-Comparison-Logic are located
    in vbWidgets.dll.

    In case you're interested in developing it further (I'd help when you run into problems there),
    the CodeBank-Posting is here:
    http://www.vbforums.com/showthread.p...)-Query-Design

    Olaf

  12. #12

    Thread Starter
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,872

    Re: Component for building boolean logic

    Much appreciated Olaf!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width