Hide visible columns selector in Outline

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Hide visible columns selector in Outline

nwb159
Hello,

I was wondering if there's any way to disable the button at the top
right of the Outline which pops up a form to select which columns are
visible?

Best wishes,

Nick
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Hide visible columns selector in Outline

Neil C Smith
I got rid of it entirely by calling
view.setCorner(JScrollPane.UPPER_RIGHT_CORNER, null);

I'm doing this from the addNotify() method of the containing
component.  See here for the code in context
http://code.google.com/p/praxis/source/browse/praxis.live.pxr.midi/src/net/neilcsmith/praxis/live/pxr/midi/MidiEditor.java?repo=live#162

The rest of that method is used to auto-resize the columns.  I found
the keyboard shortcut to do this, but couldn't find anything in the
API, so I send the table a fake key event.

Hope that's a help.

Best wishes,

Neil


On 20 February 2012 11:11, nwb159 <[hidden email]> wrote:
> Hello,
>
> I was wondering if there's any way to disable the button at the top right of
> the Outline which pops up a form to select which columns are visible?
>
> Best wishes,
>
> Nick



--
Neil C Smith
Artist : Technologist : Adviser
http://neilcsmith.net
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Hide visible columns selector in Outline

nwb159
Ah, I should have been clearer perhaps. I'm using just the plain
org.netbeans.swing.outline.Outline which extends ETable, rather than
JScrollPane.

Switching back to OutlineView is an option, but one which I would
endeavour to avoid.

On 20/02/12 14:14, Neil C Smith wrote:

> I got rid of it entirely by calling
> view.setCorner(JScrollPane.UPPER_RIGHT_CORNER, null);
>
> I'm doing this from the addNotify() method of the containing
> component.  See here for the code in context
> http://code.google.com/p/praxis/source/browse/praxis.live.pxr.midi/src/net/neilcsmith/praxis/live/pxr/midi/MidiEditor.java?repo=live#162
>
> The rest of that method is used to auto-resize the columns.  I found
> the keyboard shortcut to do this, but couldn't find anything in the
> API, so I send the table a fake key event.
>
> Hope that's a help.
>
> Best wishes,
>
> Neil
>
>
> On 20 February 2012 11:11, nwb159<[hidden email]>  wrote:
>> Hello,
>>
>> I was wondering if there's any way to disable the button at the top right of
>> the Outline which pops up a form to select which columns are visible?
>>
>> Best wishes,
>>
>> Nick
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Hide visible columns selector in Outline

Neil C Smith
Ah, sorry, OK.  It depends if you want columns to be hideable from
elsewhere I think.

Either,
  switch off column hiding using setColumnHidingAllowed(false); (from
ETable class)  This should remove the button.
Or,
  use the same hack as I mentioned previously on the scrollpane you
add the Outline to.

Basically, there's code in ETable that automatically adds that button
to a parent scrollpane's upper right corner.  You need to set it back
to null after ETable has done its thing.

N


On 20 February 2012 14:21, nwb159 <[hidden email]> wrote:

> Ah, I should have been clearer perhaps. I'm using just the plain
> org.netbeans.swing.outline.Outline which extends ETable, rather than
> JScrollPane.
>
> Switching back to OutlineView is an option, but one which I would endeavour
> to avoid.
>
>
> On 20/02/12 14:14, Neil C Smith wrote:
>>
>> I got rid of it entirely by calling
>> view.setCorner(JScrollPane.UPPER_RIGHT_CORNER, null);
>>
>> I'm doing this from the addNotify() method of the containing
>> component.  See here for the code in context
>>
>> http://code.google.com/p/praxis/source/browse/praxis.live.pxr.midi/src/net/neilcsmith/praxis/live/pxr/midi/MidiEditor.java?repo=live#162
>>
>> The rest of that method is used to auto-resize the columns.  I found
>> the keyboard shortcut to do this, but couldn't find anything in the
>> API, so I send the table a fake key event.
>>
>> Hope that's a help.
>>
>> Best wishes,
>>
>> Neil
>>
>>
>> On 20 February 2012 11:11, nwb159<[hidden email]>  wrote:
>>>
>>> Hello,
>>>
>>> I was wondering if there's any way to disable the button at the top right
>>> of
>>> the Outline which pops up a form to select which columns are visible?
>>>
>>> Best wishes,
>>>
>>> Nick
>>
>>
>>
>



--
Neil C Smith
Artist : Technologist : Adviser
http://neilcsmith.net
Loading...