Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Command Link Buttons

Aug
1,929
70
Code:
ver

TCC  22.00.41 x64   Windows 7 [Version 6.1.7601]

According to the TASKDIALOG help;

/L Convert the buttons defined by /B into command links. A command link is a bigger button that has an icon and optionally a second smaller line of text. (To display a second line, append a ^n to the /B argument, followed by the text for the second line.)
I have tried the following;

Code:
@setlocal
@echo off
set title="Display A Second Line"
set instruction="Example:"
set text=To display a second line, append a ^n to the /B argument, followed by the text for the second line.
set b1="Button 1 ^n Second Line"
set b2="Button 2"
set b3="Button 3"

taskdialog /B"Button 1 ^n Second Line" /B"Button 2" /B"Button 3" /I /L /X %title %instruction %text

endlocal

which produces;

1527320830071.png



This is not producing command link buttons, which are bigger buttons that have an icon and optionally a second smaller line of text.

How do I produce command link buttons, which are bigger buttons that have an icon and optionally a second smaller line of text?

Joe
 
Use %@CHAR[10] instead of ^N. Escapes like ^N don't work between double quotes. %@CHAR[10] will work in other places too: radio button labels, the tick box label, the footer text.... (All of which are shown between quotes in the help page.)
 
On the subject of TASKDIALOG: Empty labels for /B or /R gork the dialog. It's an API bug, and a syntax error on the user's part. But it would be nice if TASKDIALOG caught the mistake and either (1) issued a meaningful error message, or (2) supplied a default label to avoid the issue.
 
Use %@CHAR[10] instead of ^N. Escapes like ^N don't work between double quotes. %@CHAR[10] will work in other places too: radio button labels, the tick box label, the footer text.... (All of which are shown between quotes in the help page.)

If I do the following;
Code:
taskdialog /B"Button 1 %@CHAR[10] Second Line" /B"Button 2" /B"Button 3" /I /L /X %title %instruction %text

...I get the second line of text. Thanks Charles!

1527353275057.png


However, is that second line of text really smaller than the first line? I was expecting something similar to the following;

1527353108061.png


Joe
 

Similar threads

Back
Top