Jiri Pavlovsky wrote:
Mattia Barbon napsal(a):
jira wrote:

  Hi,

how can I get a atyle at caret position.
None of the GetStyle* methods seem to work under wxperl.
I get an error that the method doesn't exist.

The methods have been renamed for wxPerl, but I forgot to document it; you can use

  my $style = $rtc->GetTextAttrStyle( $pos );
  my $style_ex = $rtc->GetTextAttrExStyle( $pos );
  my $style_rich = $rtc->GetRichTextAttrStyle( $pos );

all get methods for styles have been renamed this way, for example you can use

  my $style_rich = $rtc->GetRichTextAttrStyleForRange( $range );

and

  my $style = $rtc->GetTextAttrUncombinedStyle( $pos );

  Setter methods haven't been renamed and should work as documented.



Hello,

I needed to set style for a selection.

After trying to call SetStyle with various combination of parameters
I succeeded with  $w->SetStyleRange($range, $attr) (to which I
was led by an error message).

I can't see SetStyleRange documented anywhere. Is this a wxperl wrapper?

It is used internally. In theory you should be able to call ->SetStyle with the same parameters and it should work.

Regards,
Mattia

Reply via email to