Access to title object in IDLgrAxis [message #46254] |
Sun, 13 November 2005 22:20 |
IDLmastertobe
Messages: 54 Registered: June 2004
|
Member |
|
|
hi, i have an IDLgrText object embedded into a IDLgrAxis object as a title,
but now I am try to implement an option of having the title or not
depending on user input. Does anyone know how to get access to the
IDLgrText object? Then I would be able to use the HIDE function to make
the title disappear or appear.
oAxis = OBJ_NEW('IDLgrAxis',name='colorbar',
range=[0,256],/EXACT,COLOR=!label_color, $
TICKLEN=15,MAJOR=5,TITLE=oCBTitle)
where the oCBTitle is defined as follows:
oCBTitle = OBJ_NEW('IDLgrText','Grayscale', name='title')
I tried using the "GetByName function", but I think either I can't use it
or I used it the wrong wrong. IDL prompt me error message "cannot invoke
a null subject" or something when I tried to get access by:
oTitle = oView->GetByName('cbtop/colorbar/title')
Thanks for your time.
|
|
|