Jump to content

[Discuss] Boolean XControl


Recommended Posts

index.php?app=downloads&module=display&section=screenshot&id=34

Name: Boolean XControl

Submitter: Ton Plomp

Submitted: 02 Jul 2009

File Updated: 03 Jan 2011

Category: X-Controls

LabVIEW Version: 8.5

License Type: BSD (Most common)

Boolean XControl version 2.2

Copyright © 2009, Ton Plomp

All rights reserved.

Author:

Ton Plomp

tcplomp@gmail.com

Distribution:

This code was downloaded from:

http://lavag.org/ind...ads&showfile=34

Direct OGP download

Description:

This XControl has a configurable apperance, functioning as a boolean it can show a custom picture with a custom (formatted) text.

On initial drop of the XControl it will show a browse window to load a picture (png, jpeg or bmp) as view of the boolean.

After that the GUI configuration of the XControl is shown where the position of string an picture can be set amongst other things.

The XControl has 3 possible boolean behaviours:

-Switch when pressed

The boolean value will change as soon as the mouse is down on the XControl

-Switch when release

The boolean value will change as soon as the mouse goes up on the XControl, the button will react on the mouse-down

-Switch until released

The boolean value will be changed when the mouse goes down and reverts as the mouse goes up

The button itself can be a Modern, Classic, System or System Decoration style.

Version 2.2.0 introduces nudging of the button, when the button is clicked the button (optionally) moves 1 pixel down,

For the developer it has the following advantages:

-Have a configurable boolean button with customizable interface and behaviour, all of the items can be controlled via VI-server

Instructions:

Unzip to a custom location.

Explore the possibilites with the included Demo.vi which is linked to the XControl in XControl\BooleanXControl_LCR.xctl

To reuse this XControl in mulitple projects install the OGP file with VIPM (http://www.jkisoft.com/vipm), after installation it will be located in:

\_LavaCR\UserInterface\XControls\BooleanXControl\BooleanXControl_LCR.xctl

You have to manually add it to your palette, since LabVIEW won't index XControls.

To hide the use of the XControl to developers you should lock the facade vi (Abilities\BX.Facade__LCR.vi) so the 'Show diagram' options isn't shown.

Addons:

The zip includes a CreateIconVI.vi which will convert any given picture (preferably a 32x32 png) into a VI constant with the icon of the VI the same as the picture. This can be usefull to include some constant pictures inside code that is controlling the XControl

Known issues:

Do not apply multiple properties in one property node, this is a bug in LabVIEW 8.0/8.2

Support:

See this LAVA discussion: http://forums.lavag....trol-t8869.html

Version History:

2.2.0 (21 september 2009): Added 'Nudge' as an option

Added different button styles (Classic, Modern, System, Decoration)

Added a 'Show on Hover' option

On initial drop the terminal is drawn as an icon

Fixed dependencies of the OGP

Fixed an 'Alwasy browse upon options' bug

2.1.0 (6 may 2009): Fixed a bug that closed up the project when it was closed when a VI with the Boolean XControl was still open.

Added an MNU file

Changed development version to 8.5

2.0.12: Changed the default lettertype to be the first one, size 10.

Changed the default behaviour to show the 'Hilited' item

Included a CreateIconVI.vi

2.0.11: Second upload to Lava CR

Dependencies:

Uses the following OpenG toolkits, which can be downloaded with VIPM (http://www.jkisoft.com/vipm)

oglib_appcontrol >= 2.9.1

oglib_error >= 2.3.2

oglib_file >= 2.8.2

nirsc_html_help_common >= 1.0.1

oglib_array >= 2.7.1

aglib_string >= 2.6.1

oglib_lvdata >= 2.8.1

License:

Distributed under the BSD license.

Click here to download this file

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.