LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

> Related links

Check out the related Code Repository Files or visit the LabVIEW Wiki Development Environment Portal


Tags
(This content has not been tagged yet)
 
Reply to this topic Start new topic
> [CR] Move Label.llb
BOBILLIER
post Dec 23 2007, 06:29 AM
Post #1


Very Active
***

Member
Posts: 60
Joined: 1-June 06
Member No.: 5178
Using LabVIEW Since:2006
LV:7.0 ,7.0 ,.
France Nothing Selected Nothing Selected



File Name: Move Label.llb
File Submitter: BOBILLIER
File Submitted: 6 Dec 2007
File Updated: 27 Dec 2007
File Category: LabVIEW Development Environment

Move Label V1.1.2

Copyright © 2007, Eric BOBILLIER
All rights reserved.
Put your real name here for the copyright to apply.

Author:
Eric BOBILLIER
eric.bobillier@rennes.inra.fr


Distribution:
This code was downloaded from the LAVA Code Repository: http://forums.lavag.org/downloads.html

Description:
This Vi is a tool to move label of few selected controls in TopLeft,TopCenter,TopRight,Left,Right,DownLeft,DownCenter and DownRight position. It run too with terminal
,invoke node, propriety node ,Global and control references.

Why:
I develop this tool for limit few click and for fun.

Installation:
Copy Move Label.Vi and _Move Labelfolder in your labviewxx\project folder and restart labview.

Test:
Run Ok in 7.0

Know issue:
run only in Windows.

Improvement:
Actualy the diagram constante are not concern with label mouvement but i can upgrade if someone wanted.
Like i have only Labview 7.0 ,they is certainly new object that can be concern but can't be implanted now.
But if you look code, i think it's not very difficult.

Video demonstration at: http://screencast.com/t/1V3YuwsCE2V

Acknowledgement:
Ton Plomp and Yair Neeman for the CCT__Get User App Reference__CCT Vi of the code capture Tool
And for the anonym who have write the DoKbdevent.vi

Support:
If you have any problems with this code or want to suggest features:
http://forums.lavag.org/forums.html####

Change Log:
1.0.0: Initial release of the code.
1.0.1 Minor correction about front panel apparence.
1.1.1 Add New position (TopCenter,TopRight,DownCenter,DownRight)
Now run with Global too.
Modify the Vi to be call by another Vi (Need Name and position parameter)
Now the Default position is Left.
1.1.2 Correction of major bug in selection of label position

License:
### BSD License (http://www.opensource.org/licenses/bsd-license.php) Begin ###

Copyright © 2007, ERIC BOBILLIER

All rights reserved.(see read me for details)

Click here to DOWNLOAD this file


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Dec 23 2007, 06:29 AM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
Yair
post Dec 23 2007, 06:43 PM
Post #2


Extwemely Active
*****

Premium Member
Posts: 1671
Joined: 23-January 05
From: Here
Member No.: 1431
Using LabVIEW Since:2003
LV:8.6 ,7.0 ,.
Israel Nothing Selected Nothing Selected


I like the idea a lot, but I have some important comments about the implementation:
  • It seems to me that you're going in a very round about way in order to do this. Since you're already reading the position and size properties of the labels, why not just use the position property to write the new position?
    This will remove the dependence on Windows API functions and will make the code and UI behavior simpler since you can move the label in a single command.
  • You used CCT VIs in this tool. I don't have a problem with that (most of them are OpenG VIs anyway and I think I took the other VI from one of the LAVA tools), but you should use a separate namespace or someone might have problems if they open both at the same time. Namespacing all your VIs is easy if you have the OpenG builder installed.
  • It would probably be useful if moving the label to the left also set it to be right justified and moving it to the other spots would make it left justified.

--------------------
More than meets the eye...


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
mballa
post Dec 24 2007, 03:47 AM
Post #3


Extremely Active
****

Premium Member
Posts: 384
Joined: 6-August 04
From: Gurnee Illinois
Member No.: 584
Using LabVIEW Since:1997
LV:8.5 ,8.2.1 ,7.1
United States us_illinois us_michigan


QUOTE (Yen @ Dec 23 2007, 12:43 PM) *
I like the idea a lot, but I have some important comments about the implementation:
  • It seems to me that you're going in a very round about way in order to do this. Since you're already reading the position and size properties of the labels, why not just use the position property to write the new position?
    This will remove the dependence on Windows API functions and will make the code and UI behavior simpler since you can move the label in a single command.


I tried doing this using scripting a few years ago but was unable to do so.
See here.

--------------------
If you are interested in Time saving programming
tools created in LabVIEW then download my
Icon Editor Updated July 7th 08 and my
SubVI Helper Updated Jan 7th 08


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
BOBILLIER
post Dec 24 2007, 09:11 AM
Post #4


Very Active
***

Member
Posts: 60
Joined: 1-June 06
Member No.: 5178
Using LabVIEW Since:2006
LV:7.0 ,7.0 ,.
France Nothing Selected Nothing Selected


Thanks for your comment yen

QUOTE (Yen @ Dec 23 2007, 07:43 PM) *
I like the idea a lot, but I have some important comments about the implementation:
  • It seems to me that you're going in a very round about way in order to do this. Since you're already reading the position and size properties of the labels, why not just use the position property to write the new position?
    This will remove the dependence on Windows API functions and will make the code and UI behavior simpler since you can move the label in a single command.


Like said Mark Balla if you try to used Move position of label using Position Property, you obtain one error 1060: Object cannot contain(own) the specified object.
I have work around few hours without success.

QUOTE (Yen @ Dec 23 2007, 07:43 PM) *
  • You used CCT VIs in this tool. I don't have a problem with that (most of them are OpenG VIs anyway and I think I took the other VI from one of the LAVA tools), but you should use a separate namespace or someone might have problems if they open both at the same time. Namespacing all your VIs is easy if you have the OpenG builder installed.


  • Ok, thanks for your work. If you are ok i can rename your two vi's with "__MLAB" extension.

    QUOTE
  • It would probably be useful if moving the label to the left also set it to be right justified and moving it to the other spots would make it left justified.


  • I'm not sure that run because justified have no effect on label if is size is equal to the same number of characters. And in general it's the case. the only way is to obtain the lengh of label and put his
    right conner on the left conner of the control.
    Thanks again Yen
    Eric


    Tags
    (This content has not been tagged yet)
    Go to the top of the page
    +Quote Post
    Yair
    post Dec 24 2007, 07:49 PM
    Post #5


    Extwemely Active
    *****

    Premium Member
    Posts: 1671
    Joined: 23-January 05
    From: Here
    Member No.: 1431
    Using LabVIEW Since:2003
    LV:8.6 ,7.0 ,.
    Israel Nothing Selected Nothing Selected


    Oh, I didn't actually look to see that it works. Anyway, Norm seems to have another way of doing it in the thread Mark linked to.

    --------------------
    More than meets the eye...


    Tags
    (This content has not been tagged yet)
    Go to the top of the page
    +Quote Post
    Yair
    post Dec 25 2007, 07:55 PM
    Post #6


    Extwemely Active
    *****

    Premium Member
    Posts: 1671
    Joined: 23-January 05
    From: Here
    Member No.: 1431
    Using LabVIEW Since:2003
    LV:8.6 ,7.0 ,.
    Israel Nothing Selected Nothing Selected


    QUOTE (BOBILLIER @ Dec 24 2007, 11:11 AM) *
    I'm not sure that run because justified have no effect on label if is size is equal to the same number of characters. And in general it's the case. the only way is to obtain the lengh of label and put his
    right conner on the left conner of the control.

    By the way, I suggested the justification change because if you move the label to the left side of the terminal, you would want it to stay near the terminal if it's changed. To do that, you need to right-justify it.

    --------------------
    More than meets the eye...


    Tags
    (This content has not been tagged yet)
    Go to the top of the page
    +Quote Post
    BOBILLIER
    post Dec 26 2007, 08:58 AM
    Post #7


    Very Active
    ***

    Member
    Posts: 60
    Joined: 1-June 06
    Member No.: 5178
    Using LabVIEW Since:2006
    LV:7.0 ,7.0 ,.
    France Nothing Selected Nothing Selected


    QUOTE (Yen @ Dec 25 2007, 08:55 PM) *
    By the way, I suggested the justification change because if you move the label to the left side of the terminal, you would want it to stay near the terminal if it's changed. To do that, you need to right-justify it.


    I have look before start my development the Norm solution. But with this solution, you can only move label at left or right and i don't find way to go down.


    Tags
    (This content has not been tagged yet)
    Go to the top of the page
    +Quote Post
    Yair
    post Dec 27 2007, 06:44 PM
    Post #8


    Extwemely Active
    *****

    Premium Member
    Posts: 1671
    Joined: 23-January 05
    From: Here
    Member No.: 1431
    Using LabVIEW Since:2003
    LV:8.6 ,7.0 ,.
    Israel Nothing Selected Nothing Selected


    QUOTE (BOBILLIER @ Dec 26 2007, 10:58 AM) *
    I have look before start my development the Norm solution. But with this solution, you can only move label at left or right and i don't find way to go down.

    Correct. I played around with it for a couple of minutes myself and came to the same conclusion.

    --------------------
    More than meets the eye...


    Tags
    (This content has not been tagged yet)
    Go to the top of the page
    +Quote Post

    Reply to this topicStart new topic

     




    Time is now: 7th January 2009 - 10:21 PM