Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Regular Contributor
p8
Posts: 74
Registered: ‎01-24-2013
My Carrier: none

Using ScrollView (basic)

Hello.

 

I tried the code below to get  a webview that can scroll its contents if its too big to show on screen at once.

Unfortunately it doesnt allow the user to scroll. It shows as if I hadnt used a scrollview at all.

Am I doing something silly? Is this not the way one is supposed to use a ScrollView?

 

Thanks very much in Advance.

 

//------------------------------------------------------------------

    WebView* Wv = new WebView();
       Wv->setUrl(QUrl("http://208.74.204.192/t5/Cascades-Development/webView-keeps-crashing-on-sim/td-p/1872379"));


        ScrollView * Sv = new ScrollView();
        Sv->setContent(Wv);
        Sv->scrollViewProperties()->setScrollMode(ScrollMode::Vertical);

        Wv->setVisible(true);

        Page *Pg = new Page();
        Pg->setContent(Sv);
        Application::instance()->setScene(Pg);

Please use plain text.
Contributor
hungcotac
Posts: 31
Registered: ‎01-05-2013
My Carrier: Viettel

Re: Using ScrollView (basic)

You can try this

 scrollViewProperties {
       scrollMode: ScrollMode.Both
    }

 https://developer.blackberry.com/cascades/reference/bb__cascades__scrollview.html

Please use plain text.
Developer
torpesco
Posts: 107
Registered: ‎01-29-2011
My Carrier: Telus

Re: Using ScrollView (basic)

I've played around a bit with an ImageView wrapped in ScrollView and I believe my code looks fundamentally similar. The main difference is that my ScrollView is in a Container. Not sure what (if any) difference that might make.

Please use plain text.