UI Toolkit

Reply
Accepted Solution

Problem adding Panel to ScrollPanel

Hi there,

 

So I got a Scene with a ScrollPanel on it. Then I got normal Panel with a simpel label on it.

But when I do this :

pnlScroll.AddChildFirst(new pnlTest());

 Nothing happens. I made Scene and the Panel in the UI Composer. Mayby I need an extra piece of code?

 

I also took a look at the UI_catalog sample and I couldn't find anything usefull there.

Please use plain text.

Level 3

Level 3
niwrA
Posts: 152
Registered: ‎31-07-2008
Message 2 of 5 (145 Views)

Re: Problem adding Panel to ScrollPanel

I have it working in my UI Wizard and it's pretty straightforward. When in doubt, use AddChildLast so you're sure it's visible. What size and location settings did you use on the pnlTest panel? You're probably better off creating the pnlTest object first separately, setting its location and size settings, and then adding it to the scrollpanel.

Please use plain text.

Re: Problem adding Panel to ScrollPanel

Hi, thanks for the reply.

My panel is h: 100, w: 400 (and contains a smaller label). My Scrollpanel is h:450, w:400

 

Using this :

			Panel x = new pnlTest();
			pnlScroll.AddChildLast(x);
			    pnlScroll.SetPosition(62, 115);
                pnlScroll.SetSize(543, 400);

 And using : this.RootWidget.AddChildLast(pnlScroll);

Also doens't work.

 

Please use plain text.

Level 3

Level 3
niwrA
Posts: 152
Registered: ‎31-07-2008
Message 4 of 5 (128 Views)

Re: Problem adding Panel to ScrollPanel

The scrollpanel also has specific settings for the panel width and size etc. Dit you set those?
Please use plain text.

Re: Problem adding Panel to ScrollPanel

Thanks for replying. I got it to work now using some different approach.

I made a panel with ListPanelItem and a Panel with a ScrollPanel.

Then I added the panelitem to the scrollpane!l and then added that one to my scene.

Thanks for the help

Please use plain text.
Announcements

Welcome to the PlayStation Mobile Developer Forums


This is a community for the discussion of technical topics with other developers and SCE engineers. Posting ideas/requests are also appreciated. Join the discussion!

PlayStation®Mobile開発者フォーラムでは世界中の開発者の皆様と一緒に、議論や情報交換が可能です。SCEも議論に参加し、皆様の開発をサポートします。アイデアやリクエストも大歓迎です。ぜひご参加ください。

PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.

フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと PSM DevPortalを一度ログアウトし、再度ログインしてください。