Discussion:
Richtext-Area alignment
(too old to reply)
Rolf-Werner Eilert
2014-02-26 11:23:31 UTC
Permalink
For a Richtext-Area ("txt") I have a Toggle-Button for center alignment
("btnZentriert") and try this:

Public Sub btnZentriert_Click()

If btnZentriert.Value = True Then txt.Format.Alignment = Align.Center

End

It doesn't have an effect, but I don't see how to do else.

Please enlighten me :-)

Rolf
Jussi Lahtinen
2014-02-26 17:52:40 UTC
Permalink
Just quickly from hat, but maybe you need call "txt.Refresh" also.

Jussi


On Wed, Feb 26, 2014 at 1:23 PM, Rolf-Werner Eilert <
Post by Rolf-Werner Eilert
For a Richtext-Area ("txt") I have a Toggle-Button for center alignment
Public Sub btnZentriert_Click()
If btnZentriert.Value = True Then txt.Format.Alignment = Align.Center
End
It doesn't have an effect, but I don't see how to do else.
Please enlighten me :-)
Rolf
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Fabien Bodard
2014-02-26 19:37:47 UTC
Permalink
What is richtext area ?
Post by Jussi Lahtinen
Just quickly from hat, but maybe you need call "txt.Refresh" also.
Jussi
On Wed, Feb 26, 2014 at 1:23 PM, Rolf-Werner Eilert <
Post by Rolf-Werner Eilert
For a Richtext-Area ("txt") I have a Toggle-Button for center alignment
Public Sub btnZentriert_Click()
If btnZentriert.Value = True Then txt.Format.Alignment = Align.Center
End
It doesn't have an effect, but I don't see how to do else.
Please enlighten me :-)
Rolf
------------------------------------------------------------------------------
Post by Rolf-Werner Eilert
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
Post by Rolf-Werner Eilert
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Jussi Lahtinen
2014-02-26 20:28:36 UTC
Permalink
I believe he means TextArea.

Jussi
Post by Fabien Bodard
What is richtext area ?
Post by Jussi Lahtinen
Just quickly from hat, but maybe you need call "txt.Refresh" also.
Jussi
On Wed, Feb 26, 2014 at 1:23 PM, Rolf-Werner Eilert <
Post by Rolf-Werner Eilert
For a Richtext-Area ("txt") I have a Toggle-Button for center alignment
Public Sub btnZentriert_Click()
If btnZentriert.Value = True Then txt.Format.Alignment =
Align.Center
Post by Jussi Lahtinen
Post by Rolf-Werner Eilert
End
It doesn't have an effect, but I don't see how to do else.
Please enlighten me :-)
Rolf
------------------------------------------------------------------------------
Post by Jussi Lahtinen
Post by Rolf-Werner Eilert
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
Post by Jussi Lahtinen
Post by Rolf-Werner Eilert
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
Post by Jussi Lahtinen
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
Post by Jussi Lahtinen
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Ru Vuott
2014-02-26 21:35:31 UTC
Permalink
...I believe "TextEdit".

vuott


--------------------------------------------
Mer 26/2/14, Jussi Lahtinen <***@gmail.com> ha scritto:

Oggetto: Re: [Gambas-user] Richtext-Area alignment
A: "mailing list for gambas users" <gambas-***@lists.sourceforge.net>
Data: Mercoledì 26 febbraio 2014, 21:28

I believe he means TextArea.

Jussi
Post by Fabien Bodard
What is richtext area ?
a
Post by Fabien Bodard
écrit
Post by Jussi Lahtinen
Just quickly from hat, but maybe you need call
"txt.Refresh" also.
Post by Fabien Bodard
Post by Jussi Lahtinen
Jussi
On Wed, Feb 26, 2014 at 1:23 PM, Rolf-Werner
Eilert <
Post by Fabien Bodard
Post by Jussi Lahtinen
Post by Rolf-Werner Eilert
For a Richtext-Area ("txt") I have a
Toggle-Button for center alignment
Post by Fabien Bodard
Post by Jussi Lahtinen
Post by Rolf-Werner Eilert
Public Sub btnZentriert_Click()
    If btnZentriert.Value = True
Then txt.Format.Alignment =
Post by Fabien Bodard
Align.Center
Post by Jussi Lahtinen
Post by Rolf-Werner Eilert
End
It doesn't have an effect, but I don't see
how to do else.
Post by Fabien Bodard
Post by Jussi Lahtinen
Post by Rolf-Werner Eilert
Please enlighten me :-)
Rolf
------------------------------------------------------------------------------
Post by Fabien Bodard
Post by Jussi Lahtinen
Post by Rolf-Werner Eilert
Flow-based real-time traffic analytics
software. Cisco certified tool.
Post by Fabien Bodard
Post by Jussi Lahtinen
Post by Rolf-Werner Eilert
Monitor traffic, SLAs, QoS, Medianet, WAAS
etc. with NetFlow Analyzer
Post by Fabien Bodard
Post by Jussi Lahtinen
Post by Rolf-Werner Eilert
Customize your own dashboards, set traffic
alerts and generate reports.
Post by Fabien Bodard
Post by Jussi Lahtinen
Post by Rolf-Werner Eilert
Network behavioral analysis & security
monitoring. All-in-one tool.
Post by Fabien Bodard
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Post by Fabien Bodard
Post by Jussi Lahtinen
Post by Rolf-Werner Eilert
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
Post by Fabien Bodard
Post by Jussi Lahtinen
Flow-based real-time traffic analytics software.
Cisco certified tool.
Post by Fabien Bodard
Post by Jussi Lahtinen
Monitor traffic, SLAs, QoS, Medianet, WAAS etc.
with NetFlow Analyzer
Post by Fabien Bodard
Post by Jussi Lahtinen
Customize your own dashboards, set traffic alerts
and generate reports.
Post by Fabien Bodard
Post by Jussi Lahtinen
Network behavioral analysis & security
monitoring. All-in-one tool.
Post by Fabien Bodard
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
Post by Jussi Lahtinen
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
Post by Fabien Bodard
Flow-based real-time traffic analytics software. Cisco
certified tool.
Post by Fabien Bodard
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with
NetFlow Analyzer
Post by Fabien Bodard
Customize your own dashboards, set traffic alerts and
generate reports.
Post by Fabien Bodard
Network behavioral analysis & security monitoring.
All-in-one tool.
Post by Fabien Bodard
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco
certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow
Analyzer
Customize your own dashboards, set traffic alerts and
generate reports.
Network behavioral analysis & security monitoring.
All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
Gambas-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
Ru Vuott
2014-02-26 22:12:28 UTC
Permalink
Hello,

by using ".Format.Alignment" property it "seems" it only works in this way....


Public Sub Form_Open()

TextEdit1.RichText = "<P align=right>arma virumque cano"

End


Public Sub Button1_Click()

TextEdit1.Format.Alignment = Align.Center

' but if in "Form_Open()" routine is set "<P align=LEFT"
' here this ".Format.Alignment = Align.Center" doesn't works !

End


Regards
vuott




--------------------------------------------
Mer 26/2/14, Rolf-Werner Eilert <eilert-***@t-online.de> ha scritto:

Oggetto: [Gambas-user] Richtext-Area alignment
A: "mailing list for gambas users" <gambas-***@lists.sourceforge.net>
Data: Mercoledì 26 febbraio 2014, 12:23

For a Richtext-Area ("txt") I have a
Toggle-Button for center alignment
("btnZentriert") and try this:

Public Sub btnZentriert_Click()

   If btnZentriert.Value = True Then
txt.Format.Alignment = Align.Center

End

It doesn't have an effect, but I don't see how to do else.

Please enlighten me :-)

Rolf

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco
certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow
Analyzer
Customize your own dashboards, set traffic alerts and
generate reports.
Network behavioral analysis & security monitoring.
All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
Gambas-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
Fabien Bodard
2014-02-27 07:07:41 UTC
Permalink
Yes ... because richtext have it's how embedded format instructions
Post by Ru Vuott
Hello,
by using ".Format.Alignment" property it "seems" it only works in this way....
Public Sub Form_Open()
TextEdit1.RichText = "<P align=right>arma virumque cano"
End
Public Sub Button1_Click()
TextEdit1.Format.Alignment = Align.Center
' but if in "Form_Open()" routine is set "<P align=LEFT"
' here this ".Format.Alignment = Align.Center" doesn't works !
End
Regards
vuott
--------------------------------------------
Oggetto: [Gambas-user] Richtext-Area alignment
Data: Mercoledì 26 febbraio 2014, 12:23
For a Richtext-Area ("txt") I have a
Toggle-Button for center alignment
Public Sub btnZentriert_Click()
If btnZentriert.Value = True Then
txt.Format.Alignment = Align.Center
End
It doesn't have an effect, but I don't see how to do else.
Please enlighten me :-)
Rolf
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco
certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow
Analyzer
Customize your own dashboards, set traffic alerts and
generate reports.
Network behavioral analysis & security monitoring.
All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fabien Bodard
Fabien Bodard
2014-02-27 07:07:50 UTC
Permalink
how-> own
Post by Fabien Bodard
Yes ... because richtext have it's how embedded format instructions
Post by Ru Vuott
Hello,
by using ".Format.Alignment" property it "seems" it only works in this way....
Public Sub Form_Open()
TextEdit1.RichText = "<P align=right>arma virumque cano"
End
Public Sub Button1_Click()
TextEdit1.Format.Alignment = Align.Center
' but if in "Form_Open()" routine is set "<P align=LEFT"
' here this ".Format.Alignment = Align.Center" doesn't works !
End
Regards
vuott
--------------------------------------------
Oggetto: [Gambas-user] Richtext-Area alignment
Data: Mercoledì 26 febbraio 2014, 12:23
For a Richtext-Area ("txt") I have a
Toggle-Button for center alignment
Public Sub btnZentriert_Click()
If btnZentriert.Value = True Then
txt.Format.Alignment = Align.Center
End
It doesn't have an effect, but I don't see how to do else.
Please enlighten me :-)
Rolf
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco
certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow
Analyzer
Customize your own dashboards, set traffic alerts and
generate reports.
Network behavioral analysis & security monitoring.
All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fabien Bodard
--
Fabien Bodard
Rolf-Werner Eilert
2014-02-27 07:15:35 UTC
Permalink
But what is .Format.Alignment good for if not for switching alignment?
Post by Fabien Bodard
Yes ... because richtext have it's how embedded format instructions
Post by Ru Vuott
Hello,
by using ".Format.Alignment" property it "seems" it only works in this way....
Public Sub Form_Open()
TextEdit1.RichText = "<P align=right>arma virumque cano"
End
Public Sub Button1_Click()
TextEdit1.Format.Alignment = Align.Center
' but if in "Form_Open()" routine is set "<P align=LEFT"
' here this ".Format.Alignment = Align.Center" doesn't works !
End
Regards
vuott
--------------------------------------------
Oggetto: [Gambas-user] Richtext-Area alignment
Data: Mercoledì 26 febbraio 2014, 12:23
For a Richtext-Area ("txt") I have a
Toggle-Button for center alignment
Public Sub btnZentriert_Click()
If btnZentriert.Value = True Then
txt.Format.Alignment = Align.Center
End
It doesn't have an effect, but I don't see how to do else.
Please enlighten me :-)
Rolf
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco
certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and
generate reports.
Network behavioral analysis & security monitoring.
All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Rolf-Werner Eilert
2014-02-27 08:28:45 UTC
Permalink
Yes, that's for the plain display. But when in the editor, there is a
.Format.Alignment property which should serve as a switch without
setting the html tags directly in the string.
As I understood that (and as it works here) you define some "starting
elements" (like Fontsize) before writing the text. The text itself is
like html and can switch its alignment where ever needed back and forward.
(E.g.: I use it to show a frequency where the last 3 digits are smaller
than the other digits for a better read out.)
Wolfgang
Post by Rolf-Werner Eilert
But what is .Format.Alignment good for if not for switching alignment?
Post by Fabien Bodard
Yes ... because richtext have it's how embedded format instructions
Post by Ru Vuott
Hello,
by using ".Format.Alignment" property it "seems" it only works in this way....
Public Sub Form_Open()
TextEdit1.RichText = "<P align=right>arma virumque cano"
End
Public Sub Button1_Click()
TextEdit1.Format.Alignment = Align.Center
' but if in "Form_Open()" routine is set "<P align=LEFT"
' here this ".Format.Alignment = Align.Center" doesn't works !
End
Regards
vuott
--------------------------------------------
Oggetto: [Gambas-user] Richtext-Area alignment
A: "mailing list for gambas users"
Data: Mercoledì 26 febbraio 2014, 12:23
For a Richtext-Area ("txt") I have a
Toggle-Button for center alignment
Public Sub btnZentriert_Click()
If btnZentriert.Value = True Then
txt.Format.Alignment = Align.Center
End
It doesn't have an effect, but I don't see how to do else.
Please enlighten me :-)
Rolf
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco
certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and
generate reports.
Network behavioral analysis & security monitoring.
All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Rolf-Werner Eilert
2014-02-27 07:14:09 UTC
Permalink
Post by Ru Vuott
Hello,
by using ".Format.Alignment" property it "seems" it only works in this way....
Public Sub Form_Open()
TextEdit1.RichText = "<P align=right>arma virumque cano"
End
Public Sub Button1_Click()
TextEdit1.Format.Alignment = Align.Center
' but if in "Form_Open()" routine is set "<P align=LEFT"
' here this ".Format.Alignment = Align.Center" doesn't works !
End
Regards
vuott
Either we just use it in a wrong way, or there is a hidden "feature" ;)

For bold, italics etc., this runs flawlessly. My code for bold:

Public Sub btnFett_Click()

txt.Format.Font.Bold = btnFett.Value

txt.SetFocus

End

Somewhat strange though, when you use one of these for the first time
after starting the program, it takes quite some seconds before the
cursor returns. Maybe it's loading all fonts in the background or
something like that. Anyway I was thinking about setting Mouse.Wait for
it. Can you confirm that?

Regards
Rolf
Loading...