LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resizing Text

Hello,

Is there any way to resize the text on the front panel when the window
is resized.

If there is I am assuming that all text must be written using string
constants rather just the text tool.

cheers for your help

Nick
0 Kudos
Message 1 of 11
(4,718 Views)
Nick,

To answer your question: No.

Also, that is a correct assumption. Text created by using the text tool is not resized with the window.

If it helps, I always make it a point to ensure that my windows cannot, and do not need to be resized. This of course depends on your situation, but in most cases, forcing the user to accomodate your program is probably a better choice than trying to allow resizing of windows (which is clumsy no matter what.)
0 Kudos
Message 2 of 11
(4,717 Views)
> Is there any way to resize the text on the front panel when the window
> is resized.
>


There isn't a built-in way. The built-in resizing is meant to do what
most other apps do, that is they give more room to your graph, your
table, or your listbox. I don't think there is a single app on my
computer that grows the contents of the window when I resize it.

But, that doesn't mean that you don't have a good reason for doing it.
Until there is something built into LV, you can resize the text
programmatically using control references, but it will take alot of
work. You should probably search around for someone that has already
done this or has a VI that changes the font or something similar. Do
some google searches, search devzone and some of the othe
r LV web-ring
sites.


Greg McKaskle
0 Kudos
Message 3 of 11
(4,717 Views)
cheers for the advice.
0 Kudos
Message 4 of 11
(4,717 Views)
There is a bit of a cheat way!

First make sure that you have checked the box in Vi Properties saying 'Scale all objects on panel as window resizes' under Window size...which i'm sure you have done.

Notice that the controls change size and the text doesn't...as i'm sure you already know. Well, if you make all the text you want resized on the front panel into bitmaps and import and paste them as separate pictures into the front panel, they will resize along with the controls!

As i said, a bit of a cheat, but it can be done if you want it.

*smiles*

Kim
0 Kudos
Message 5 of 11
(4,717 Views)
Hi,

I tried to mail a VI twice to this newsgroup, but it doesn't come through.
So I'll send you an example.

It's a very 'quick and dirty' example.

It is posible to resize 'text tool' text (it was a supprise to me too).

This example is quick and dirty, because stuff needs to be closed too. It
shows how to resize a 'text tool' text. You'll have to figure out the link
with the panel resize yourself. Events come to mind, but I still haven't
used them (shame on me).

Regards,

Wiebe.


"Nicko" wrote in message
news:aca13912.0208072359.7d705b2b@posting.google.com...
> cheers for the advice.
0 Kudos
Message 6 of 11
(4,717 Views)
Thanks for everyones help. Problem solved, and not in cheat or dirty
way either.

If anyone would like a copy of a vi which resizes text when the user
resizes the window give me shout. It only switches between 2 sizes but
it gives the general idea.

Nick 🙂
0 Kudos
Message 7 of 11
(4,717 Views)

Nick,

3 years+ later I bet you thought nobody would ask.

Any chance you still have the re-size text .vi to hand, and will it work on the text in a string indicator?

I have a training demo application, it could be installed on any PC, and I need to resize to the screen size so everyone can see the demo.

I appreciate things have moved on over 3 years, e.g. new releases of LabVIEW, but any advice would be gratefully received.

Regards,

Bandit

 

0 Kudos
Message 8 of 11
(4,590 Views)
Here is a VI that will show you all you need



Joe.
"NOTHING IS EVER EASY"
Message 9 of 11
(4,577 Views)
Joe,
 
Thanks for a brilliant reply, 5* plus and very prompt.
 
In one fell swoop I learned how to adjust my font, query the registry, and determine the operating sytem.   
 
Share what you know.  - Obviously not very much yet. Smiley Sad
 
Learn what you don't.  - At this rate it won't take long.  Smiley Happy
 
Bandit.
0 Kudos
Message 10 of 11
(4,554 Views)