When setting up the splitpanel you specify the dividerlocation as an absolute width size for example 200. But the api lets you only specify a percentage. This seems not very consistent to me. Is there a way you can find out if it is collapsed and is there any other api call to collapse/expand?

asked 19 May '14, 23:07

Raymond's gravatar image

Raymond
24326
accept rate: 0%


Hi Raymond,

Unfortunately, there is not an API to collapse/expand splitPanel or get its state.

Regards,
Ibrahim

link

answered 20 May '14, 15:46

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
1.5k5
accept rate: 25%

I think the API documentation is not correct. It says that api_panel.getdividerlocation / api_panel.setdividerlocation is a percentage of the split panel. As far as I can tell it is actually a pixel width.

For anyone interested here is how I solved the collapse/expand. - add during your application initialization a session variabe with the default width.

api_session.add('menu_width',0);

  • add a button in your application on a panel
  • create action toggleMenuWidth for event buttonPress

procedure toggle_menu_width is l_width number; begin l_width := api_session.getvaluenr('menu_width'); if l_width != 0 then api_panel.setdividerlocation('mainSplitPanel',0); api_session.add('menu_width',0); else api_panel.setdividerlocation('mainSplitPanel',226); api_session.add('menu_width',226); end if; end;

link

answered 21 May '14, 01:53

Raymond's gravatar image

Raymond
24326
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2

Asked: 19 May '14, 23:07

Seen: 874 times

Last updated: 21 May '14, 01:53


© Copyright Gerger 2017