accessing widgets of widget group

hi

In my application i am creating widgets using widget database.

I created one group of widgets in picture module then using
ApCreateModuleFamily i created that widget group in my window.

But now i am not able to access the group or individual widget address using
ABW_ notation, even if their is only one group in the window. even
ApGetWidgetPtr also return NULL.

now, how i can access individual widgets of the group when group is created
using ApCreateWidgetFamily function?

thanks in advance
sameer

Hello

Check out the documentation on walking the widget hiearchy. Basically
you will have to go through the widget hiearchy, starting at the widget
pointer that gets returned by the call tp ApCreateModuleFamily.

The function you should look at first is here:
http://www.qnx.com/developer/docs/qnx_4.25_docs/photon114/lib_ref/pt/ptwidgettreetraverse.html

At the bottom of the page there is a link to the section on ordering
widgets.

Thanks,
Rodney

sam wrote:

hi

In my application i am creating widgets using widget database.

I created one group of widgets in picture module then using
ApCreateModuleFamily i created that widget group in my window.

But now i am not able to access the group or individual widget address using
ABW_ notation, even if their is only one group in the window. even
ApGetWidgetPtr also return NULL.

now, how i can access individual widgets of the group when group is created
using ApCreateWidgetFamily function?

thanks in advance
sameer
\

Rodney Dowdall wrote:

Hello

Check out the documentation on walking the widget hiearchy. Basically
you will have to go through the widget hiearchy, starting at the widget
pointer that gets returned by the call tp ApCreateModuleFamily.

The function you should look at first is here:
http://www.qnx.com/developer/docs/qnx_4.25_docs/photon114/lib_ref/pt/ptwidgettreetraverse.html


At the bottom of the page there is a link to the section on ordering
widgets.

Thanks,
Rodney

sam wrote:

hi

In my application i am creating widgets using widget database.

I created one group of widgets in picture module then using
ApCreateModuleFamily i created that widget group in my window.

But now i am not able to access the group or individual widget address
using
ABW_ notation, even if their is only one group in the window. even
ApGetWidgetPtr also return NULL.

now, how i can access individual widgets of the group when group is
created
using ApCreateWidgetFamily function?

thanks in advance
sameer





Another neat way to identify widgets if you don’t want to be really

careful about the ordering on them is to put identification data in the
Pt_ARG_USER_DATA, which you easily can set to a string when using phab.

/Johan

hi johan & Rodney,
thanks for reply,

in my application i can traverse the widget tree but i am not able to
identify the exact widget with the widget address.
one way to achive this is using the USER DATA but i am already using
this for storing some widget specific data in widget user data.
second thing is order of widget, after setting the order of the widget, i
have to be carefull whenever i want to add any new widtet to the group as
the code may not work in that case. setting the specific order of the widget
becomes the contraint in the design.

all these can be avoided if i can identify the widget using the ABN_
notation.

i am not able to understand that why group in normal window or dialog
box can be addressed using the ABN_ noation but same is not possible if i
use the same through widget database.?

why the ABW_ addressing does not work with the widgets created from
widget database?
why ABW_ABC does not return the address of the last created widget with
the name ABC?

can anybody explain the difference in handing the widget created with
widget database and widget created directly i.e. without widget database.


thanks

sameer