Discussion:
[Foxgui-users] FXLabel
Julia Dudascik (Contractor)
2017-03-24 15:25:49 UTC
Permalink
Hi

Is there a way to make an FXLabel so that it goes to the next line? I have
a string that will be updated and will need to go to the next line in the
interface. I would like to update FXLabel with this string, but I need
FXLabel to write the string on the interface with the carriage returns. How
can I do this?

Thanks
Julia
Nuri Boardman
2017-03-24 15:33:14 UTC
Permalink
i think you can use a an FXText control, and modify it to be read only, and
change the background color
but there might be an easier way of doing that

On Fri, Mar 24, 2017 at 11:25 AM, Julia Dudascik (Contractor) <
Post by Julia Dudascik (Contractor)
Hi
Is there a way to make an FXLabel so that it goes to the next line? I have
a string that will be updated and will need to go to the next line in the
interface. I would like to update FXLabel with this string, but I need
FXLabel to write the string on the interface with the carriage returns. How
can I do this?
Thanks
Julia
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Foxgui-users mailing list
https://lists.sourceforge.net/lists/listinfo/foxgui-users
JVZ
2017-03-24 16:09:23 UTC
Permalink
On Fri, 24 Mar 2017 11:33:14 -0400
Post by Nuri Boardman
i think you can use a an FXText control, and modify it to be read only, and
change the background color
but there might be an easier way of doing that
Yes, FXText can be easily changed to match the "looks" of the FXLabel:

1) Change the background and text colors.

2) Disable horizontal (and/or vertical) scrollbars.

3) Constrain its layout sizes in some ways.

4) Automatically wrap text lines.



-- JVZ




+----------------------------------------------------------------------------+
| Copyright (C) 10:50 03/24/2017 Jeroen van der Zijp. All Rights Reserved. |
+----------------------------------------------------------------------------+
Sander Jansen
2017-03-24 16:29:58 UTC
Permalink
It doesn't have a mode to center all lines horizontally like FXLabel
however...

Sander
Post by JVZ
On Fri, 24 Mar 2017 11:33:14 -0400
Post by Nuri Boardman
i think you can use a an FXText control, and modify it to be read only,
and
Post by Nuri Boardman
change the background color
but there might be an easier way of doing that
1) Change the background and text colors.
2) Disable horizontal (and/or vertical) scrollbars.
3) Constrain its layout sizes in some ways.
4) Automatically wrap text lines.
-- JVZ
+-----------------------------------------------------------
-----------------+
| Copyright (C) 10:50 03/24/2017 Jeroen van der Zijp. All Rights Reserved. |
+-----------------------------------------------------------
-----------------+
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Foxgui-users mailing list
https://lists.sourceforge.net/lists/listinfo/foxgui-users
JVZ
2017-03-24 17:07:50 UTC
Permalink
On Fri, 24 Mar 2017 11:29:58 -0500
Post by Sander Jansen
It doesn't have a mode to center all lines horizontally like FXLabel
however...
That's true; and no right-aligned text either. But you could turn on the
style buffer for some creative text coloring.


-- JVZ



+----------------------------------------------------------------------------+
| Copyright (C) 12:00 03/24/2017 Jeroen van der Zijp. All Rights Reserved. |
+----------------------------------------------------------------------------+
JVZ
2017-03-24 15:54:34 UTC
Permalink
On Fri, 24 Mar 2017 11:25:49 -0400
Post by Julia Dudascik (Contractor)
Hi
Is there a way to make an FXLabel so that it goes to the next line? I have
a string that will be updated and will need to go to the next line in the
interface. I would like to update FXLabel with this string, but I need
FXLabel to write the string on the interface with the carriage returns. How
can I do this?
Thanks
Julia
FXLabel is probably not the best widget for variable stings, but it should
support multiple lines.

If you have more-or-less static labels, a string containing \n will be
shown in multiple lines in FXLabel; you'd probably want to make sure
the justification mode is set to JUSTIFY_LEFT.

But FXLabel isn't meant for lots of text, or text that changes often. This
is because every change of text causes layouts (as the widget's size is
dependent on the contents).

If you need to display lots of text, I would recommend FXText which is
made for that kind of thing.

FXText also supports line-wrapping; with FXText in wrap-mode, lines will
automatically be split when too wide, and in addition, scroll-bars can be
introduced when the text gets really long.


Hope this helps,


-- JVZ




+----------------------------------------------------------------------------+
| Copyright (C) 10:40 03/24/2017 Jeroen van der Zijp. All Rights Reserved. |
+----------------------------------------------------------------------------+
Loading...