Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Design a Custom Sheet Menu for Every Sheet?

Hi!

Let's assume a QV-App consisting of 8 sheets. I would like to have on every sheet a section, f.x. on the left side, containing links to every sheet with the link to the current sheet being highlighted.

Clipboard02.png

At the present the best way I can think of to realize this is rather cumbersome - I would have to create 8 buttons linking to each of the 8 sheets - copy-pasting those 8 buttons to the remaining 7 sheets - making sure they are placed identically and then adjust the respective (linking to the present sheet) button's properties to have it highlighted.

Is there a way to get this done which is easier to realize and especially easier to maintain?

Kind regards

Raffael

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Use an expression something like this for your colour expression

     if ( GetActiveSheetId() = 'Document\SH01'  , yellow() , red() )

For a button on the General tab :

  • Set the Background to plain
  • Choose 'Color' just below this
  • Double click the actual color box
  • For Base color choose Calculated
  • Enter your expression

Note:  Personally I use Text Objects instead of Buttons,for these on the General tab :

  • For Background, select color
  • Double click the actual color box
  • For Base color choose Calculated
  • Enter your expression

View solution in original post

5 Replies
Anonymous
Not applicable
Author

The tabs on a qvw dashboard already provide exactly the functionality you wish to create without taking up any valuable screen estate for all the additional buttons.

However should you really wish to re-invent the wheel, then a couple things should help you :

  • For the button copy / pastes, do a Paste Sheet Object as link

  • Use the GetActiveSheetID() function to auto highlight the button for the active sheet.
Not applicable
Author

Well, specific ideas about how a Dashboard is supposed to look like is pretty common among customers. So just saying stick with the tab row otherwise you are "reinventing the wheel" is not a justified assessment.

How would I implement a conditional formatting - f.x. setting background color of button to red if sheet-ID is "A" and to blue if sheet-ID is not "A". Do you have a link or the chapter of the reference where I can read about it?

Anonymous
Not applicable
Author

Use an expression something like this for your colour expression

     if ( GetActiveSheetId() = 'Document\SH01'  , yellow() , red() )

For a button on the General tab :

  • Set the Background to plain
  • Choose 'Color' just below this
  • Double click the actual color box
  • For Base color choose Calculated
  • Enter your expression

Note:  Personally I use Text Objects instead of Buttons,for these on the General tab :

  • For Background, select color
  • Double click the actual color box
  • For Base color choose Calculated
  • Enter your expression
Not applicable
Author

But it seems like the possibility of formulating a conditional formatting using an expression is restricted to the background-color. Is that correct?

Anonymous
Not applicable
Author

There are other things you could change dependant on Sheet ID, some examples include :

  • Text displayed
  • Font colour
  • Hide / Show Objects
  • Caption colours

If you incorporate the expression into a variable and then exploit the Document level Variable Event Triggers you can do loads of other things.