[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: Problems using Component Browser
|
The only other SWT control that can show text with varying colours, styles,
etc. is StyledText. However it will not accept an HTML string as input
(existing request for this:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=212829 ).
What layout problem are you having with the Browser? It shouldn't be
different from other controls w.r.t. giving it a size and location. Or is
your problem with the layout of its content? The one thing that a Browser
cannot do is pack() to a preferred size that's ideal for showing its current
content.
Grant
"Markus Oley" <markus.oley@xxxxxxxxxxx> wrote in message
news:6d8dc5aadc0cae7f9f29cb9cf086fbe7$1@xxxxxxxxxxxxxxxxxx
> Hi Grant,
> thank you for your answer, that's exactly my problem. I even have a
> problem layouting the browser-component so I think I want to try another
> component.
> Can you give me a hint, what SWT-Components can show HTML-text (not the
> structured text...)
> I will implement the back/forward-functionality for my self, too.
>
> Thanx for your help
> Markus
>
> > I see a bug with invoking setText() consecutive times, so I've logged
> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=289470 . I believe this
is at
> > least part of your problem, but your case seems more complicated if
there
> > are new windows opening, etc. If this report does not capture your case
> > adequately then you'll need to provide a snippet that shows what you're
> > doing.
>
>
> > One detail to note about setText() is that this works on all browser
> > implementations by navigating to about:blank and then setting the page
> > content from the string. For this reason calling back() and forward()
> > likely will not do what you want because once you navigate away from a
page
> > whose content came from setText() that page's content is gone. So
instead
> > of calling back() and forward() you'll have to maintain your own page
> > history and call setText() to navigate between pages in the history.
This
> > is of course dependent on the fix for
> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=289470 .
>
> > Grant
>
>
> > "Markus Oley" <markus.oley@xxxxxxxxxxx> wrote in message
> > news:0972696746ef2e10bb1af955718cc504$1@xxxxxxxxxxxxxxxxxx
> >> Hi to everyone,
> >>
> >> I use an Browser in a class that extends
> >> org.eclipse.jface.dialogs.PopupDialog.
> >>
> >> I show an html-text (no url) in this component, in which there are
> >> different links. These links don't link to another site, but I want to
> >> change the html-text (using method setText(..)) when I click one link.
> >> I use the LocationListener to set the new text.
> >> But the component just opens a new window for a very short time, I
don't
> >> see whats its content.
> >> Then it closes both windows, the recently opened window and the
> >> PopupDialog himself.
> >>
> >> I just want to set a new text in the browser, that is shown and want
the
> >> browser to recognize it as new site, so I can call back() and
forward(),
> >> if available.
> >>
> >> Can you help me?
> >> Thanks in advance
> >>
> >> Markus
> >>
> >>
> >>
>
>