Re: Disable underline - UnoControlFixedHyperlinkModel

2015-04-24 Thread Jörg Schmidt
Hello,

 From: Bernard Marcelly [mailto:marce...@club-internet.fr] 
 Sent: Thursday, April 23, 2015 3:24 PM
 To: api@openoffice.apache.org
 Subject: Re: Disable underline - UnoControlFixedHyperlinkModel
 
 Hi Jörg,
 That's the usual problem of a structure inside a structure : 
 you must use a 
 temporary variable.
 
 Dim fd As Object
 
 With fhm
' 
fd = .FontDescriptor
fd.Underline = com.sun.star.awt.FontUnderline.NONE
.FontDescriptor = fd
 End With
 
 Remark : there is a side effect, the text color is now black. 
 If you want to 
 color the text, add this instruction:
 
.TextColor = RGB(0,0,250)

works fine, thank you


Greetings,
Jörg


-
To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org
For additional commands, e-mail: api-h...@openoffice.apache.org



Re: Disable underline - UnoControlFixedHyperlinkModel

2015-04-23 Thread Bernard Marcelly

Hi Jörg,
That's the usual problem of a structure inside a structure : you must use a 
temporary variable.


Dim fd As Object

With fhm
  ' 
  fd = .FontDescriptor
  fd.Underline = com.sun.star.awt.FontUnderline.NONE
  .FontDescriptor = fd
End With

Remark : there is a side effect, the text color is now black. If you want to 
color the text, add this instruction:


  .TextColor = RGB(0,0,250)

Regards / Bernard

Jörg Schmidt a écrit le 2015-04-23 08:26 :

Hello,

How can I stop underlining of hyperlinks in UnoControlFixedHyperlinkModel?

My current code is:

Dim dia_ueber
Dim frm_ueber
Dim fhm

GlobalScope.BasicLibraries.LoadLibrary(jum)
GlobalScope.DialogLibraries.LoadLibrary(jum)
frm_ueber = DialogLibraries.jum.dlg_ueber
dia_ueber = CreateUnoDialog(frm_ueber)

'dia_ueber.Model.getByName(lbl_version).Label = ex_ver

fhm = 
dia_ueber.Model.createInstance(com.sun.star.awt.UnoControlFixedHyperlinkModel)
With fhm
.Name = Hyperlink1
.PositionX = 10
.PositionY = 64
.Width = 80
.Height = 14
.Label = www.jm-schmidt.de
.URL = http://www.jm-schmidt.de/;
End With
dia_ueber.Model.insertByName(fhm.Name, fhm)

dia_ueber.execute


An experiment with:

With fhm
'...
.FontDescriptor.Underline = 0
End With

it does not work.


Gretings,

Jörg


-
To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org
For additional commands, e-mail: api-h...@openoffice.apache.org



-
To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org
For additional commands, e-mail: api-h...@openoffice.apache.org