Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

Feature request: Expressions for "border"_checkbox

Hi,

I quite often have the requirement of creating some "invisible" (transparent) buttons and overlaying them over e.g. the cells of a straight_table.

=> To be able to see them whenever I have to do some development_work, I already have some text in them that will appear on clicking a "dev" button.

<=> That isn't yet quite satisfactory since what's equally important is  the size of a checkbox (so I  can properly align them). So I need the borders

<=> The "border" checkbox doesn't accept expressions, so I have to activate or deactivate it on each of the buttons in turn.

It would be much easier if I could make that dependent on the "dev" button, too, so when I click it, the border of every one of my buttons would become visible.

=> Expressions to activate/deactivate the borders in the dialog ("layout" tab) would be much more handy. Simple checkboxes are somewhat inflexible ...

Best regards,

DataNibbler

1 Solution

Accepted Solutions
marcus_sommer

Hi DataNibbler,

it seems to be a feature that if a border is set then it couldn' be transparent ... (I have tried it). Maybe you could come nearby enough with argb(1,0,0,0) or similar.

If not you could try it with a macro - here an example from APIGuide.qvw:

rem ** set thin border for all objects on active sheet **

set sh = ActiveDocument.ActiveSheet

for i = 0 to sh.NoOfSheetObjects-1

    set obj = sh.SheetObjects(i)

    frame = obj.GetFrame

    frame.BorderEffect = 1    'depressed border

    obj.SetBorder frame

next

- Marcus

View solution in original post

4 Replies
marcus_sommer

Hi DataNibbler,

the border couldn't be set dynamically per expression-variable, but you could try it with a transparent color for them, like: if(var = 0, argb(0,0,0,0), black()).

- Marcus

datanibbler
Champion
Champion
Author

Hi Marcus,

that is a very good idea. With the argb() function, I can easily switch the colour between black and "transparent_black)

Thanks a lot!

Best regards,

DataNibbler

P.S.: Only ... it won't work. I don't know why. The text within the buttons that I have does react to that variable, just like it should - but the border doesn't. I tick the checkbox, and in the edit_field for the colour, I write

>> = IF(v_Dev = 1, argb(255, 0,0,0), argb(0,0,0,0)) <<

=> Can you tell me what's wrong about that?

marcus_sommer

Hi DataNibbler,

it seems to be a feature that if a border is set then it couldn' be transparent ... (I have tried it). Maybe you could come nearby enough with argb(1,0,0,0) or similar.

If not you could try it with a macro - here an example from APIGuide.qvw:

rem ** set thin border for all objects on active sheet **

set sh = ActiveDocument.ActiveSheet

for i = 0 to sh.NoOfSheetObjects-1

    set obj = sh.SheetObjects(i)

    frame = obj.GetFrame

    frame.BorderEffect = 1    'depressed border

    obj.SetBorder frame

next

- Marcus

datanibbler
Champion
Champion
Author

Hi,

no, the near-transparency doesn't work neither.

Well, never mind - it does work when I set it to WHITE-or-BLACK. That is not quite as good as transparent since I have a background_picture and the white lines show of course, but well, I guess it's better than to start messing with macros - I try not to make it more complicated than necessary. Some things about our system are strange already, some things just don't work the way they seem to work everywhere else ...

Best regards,

DataNibbler