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.

inside custom component

Native Development

Reply
Developer
Posts: 128
Registered: ‎05-06-2010
My Device: storm 2

Custom control / page / drawing to screen

Hi folks

 

How do I create a control so that I can draw to the screen (e.g. draw line, move images around, respond to touches, etc).?


Essentially a custom control with a paint function what I want, like BB 7 Java - but I cant find any examples/documentation.


Best wishes

Gareth

Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Custom control / page / drawing to screen

Developer
Posts: 128
Registered: ‎05-06-2010
My Device: storm 2

Re: Custom control / page / drawing to screen

Thanks. That's rather involved. Is it really possible that rim have made developing for bb10 harder than old bb?
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Custom control / page / drawing to screen

There is an explanation for this:

http://devblog.blackberry.com/2012/09/cascades-custom-ui/

 

Maybe simplier API will appear in future:

 

https://www.blackberry.com/jira/browse/BBTEN-1

 


Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 128
Registered: ‎05-06-2010
My Device: storm 2

Re: Custom control / page / drawing to screen

Thanks that's helpful. Maybe I'll have to figure but how to-do it another way. Is there a gridlayout and is it possible to-do drag and drop with imageviews in the grid view?
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Custom control / page / drawing to screen

There's Stack, Dock and Absolute layout. For complex controls you'll probably have to use the latter:

https://developer.blackberry.com/cascades/documentation/ui/layouts/index.html

 

Also nine-patch images are useful:

http://supportforums.blackberry.com/t5/Cascades-Development/Creating-a-border-using-nine-slice-image...

 


Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 128
Registered: ‎05-06-2010
My Device: storm 2

Re: Custom control / page / drawing to screen

Oh ok thanks for your help. Despite waiting for the Sdks to mature before porting my apps it seems they are lacking fundamental features which means porting the first two of my apps is going to be a pain. Have to say I'm quite disappointed. Also the lack of qml debugger is astonishing. I had hoped bb10 might have been a revival but I haven't seen anything to indicate it yet.