how can I get or set property to a graph datawindow in a composite datawindow?

I make a composite style datawindow. There is a graph style datawindow in
it.
I can't get or set the graph style datawindow 's property like title,
values.label and or so.
the graph style datawindow 's datasource is extern data.
I do it like this:
 datawindow dw_child
 dw_composite.getchild('graph', dw_child)
 dw_child.object.gr_1.title = 'hello'
It failed!
then I use this
 datastore ds_1
 ds_1 = create datastore
 ds_1.dataobject = 'data_graph'
 ds_1.object.gr_1.title = 'hello'
 datawindow dw_child
 dw_composite.getchild('graph', dw_child)
 ds_1.sharedata(dw_child)
It also failed!
But I can set the graph datawindow 's property not in the composite
datawindow.
Somebody help me!
Thanks in advance!

0
mmr
12/19/1999 8:22:24 AM
📁 sybase.powerbuilder.datawindow
📃 28057 articles.
⭐ 5 followers.

💬 3 Replies
👁️‍🗨️ 1235 Views


Try this:
 datawindow dw_child
 dw_composite.getchild('graph', dw_child)
 dw_composite.modify ("graph.title='Hello'")
It should work assuming your graph has a name 'graph'. I would use another
name because 'graph' is a keyword for datawindow.
Remember about single quotes around Hello.

Joanna

mmr napisa�(a) w wiadomo�ci: ...
>I make a composite style datawindow. There is a graph style datawindow in
>it.
>
>I can't get or set the graph style datawindow 's property like title,
>values.label and or so.
>the graph style datawindow 's datasource is extern data.
>I do it like this:
> datawindow dw_child
> dw_composite.getchild('graph', dw_child)
> dw_child.object.gr_1.title = 'hello'
>It failed!
>
>then I use this
> datastore ds_1
> ds_1 = create datastore
> ds_1.dataobject = 'data_graph'
> ds_1.object.gr_1.title = 'hello'
> datawindow dw_child
> dw_composite.getchild('graph', dw_child)
> ds_1.sharedata(dw_child)
>It also failed!
>
>But I can set the graph datawindow 's property not in the composite
>datawindow.
>
>Somebody help me!
>
>Thanks in advance!
>
>

0
Joanna
12/20/1999 5:27:47 AM
There 's some error in your program!
1.At first datawindowchild dw_child not datawindow dw_child.
2.dw_child.modify not dw_composite.modify
3.dw_child or dw_composite do not success!
Please test!


0
mmr
12/21/1999 8:26:39 AM
Sorry,
The first error I've copied from your code sample, the second was introduced
by myself. The code should look like this:
datawindowchild dw_child
dw_composite.getchild('graph', dw_child)
dw_child.modify ("graph.title='Hello'")
And this is a working sample from my program:
dw_1.getchild ("gr_1", ldwc_wykres)
ldwc_wykres.modify ("gr_1.values.dispattr.format ='[general]'")
ldwc_wykres.modify ("gr_1.values.label ='[tys. ton/dob�]'")
ldwc_wykres.modify ("gr_1.title ="+&
     "'�rednie wydobycie brutto ze �ciany" + &
 " w " + em_rok.text + " roku'")

Best regards
Joanna


mmr napisa�(a) w wiadomo�ci: ...
>There 's some error in your program!
>
>1.At first datawindowchild dw_child not datawindow dw_child.
>2.dw_child.modify not dw_composite.modify
>3.dw_child or dw_composite do not success!
>
>Please test!
>
>
>
>

0
Joanna
12/21/1999 11:13:39 AM
Reply: