positioning label

What argument needs to be set to position a label. I’m creating a window
from applicatoin code. not phab. and I want to add a label, I can get the
label to add, with the text I set, but I can’t get t to position where I
want it. Can sombody tell me what might work.

Thanks
Ben

Hi Ben

You can use the Pt_ARG_POS to set the x, y co-ordinates for the label
widget. For example:

PhPoint_t pos;
pos.x = 50;
pos.y = 100;
PtSetResource(ABW_base_lbl, Pt_ARG_POS, &pos, 0);

You can set this resource before you create the widget.

You could also use the Pt_ARG_AREA this will allow you to set the x,y
co-ordinates along with the width and height of the widget.
Check the helpviewer for more details.

Hope this helps
Regards
Brenda

Ben wrote:

What argument needs to be set to position a label. I’m creating a window
from applicatoin code. not phab. and I want to add a label, I can get the
label to add, with the text I set, but I can’t get t to position where I
want it. Can sombody tell me what might work.

Thanks
Ben

\

You need to specify the area and the dimension of the ptlabel before
creating it.
something like:

PhArea_t Area;
PhDim_t Dim;
Area.pos.x = 200; Area.pos.y = 175;
Dim.h = 100; Dim.w = 230
PtSetArg(&args[0], Pt_ARG_AREA, &Area, 0);
PtSetArg(&args[1], Pt_ARG_DIM, &Dim, 0);
add anymore PtSetArg
Finally calls…
PtCreateWidget function.

Hope this helps… U need to play around with those pos.x, pos.y dim.h and
dim.w values in order to position correctly

Ben <ben@handcoder.com> wrote in message news:9u9jq5$s5p$2@inn.qnx.com

What argument needs to be set to position a label. I’m creating a window
from applicatoin code. not phab. and I want to add a label, I can get
the
label to add, with the text I set, but I can’t get t to position where I
want it. Can sombody tell me what might work.

Thanks
Ben
\