|
Re: Access to title object in IDLgrAxis [message #46253 is a reply to message #46252] |
Sun, 13 November 2005 22:50  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
IDLmastertobe writes:
> 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')
I should think this would do it:
oAxis -> GetProperty, Title=oCBTitle
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|