Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Text in TLB_CREATE
adoscript adoscript constructs
Answer
2/4/18 8:50 AM
Dear ADOxx community!

I would like to have more text in an TLB window. I included a screenshot of my problem in the thread. "In this window you...." should be a longer text but it is cut. How is it possible to include that text in full length. I tried to use the parameter boxtext.

Another possibility would be to integrate a help button, but I did not get how to include text, which should be displayed when the help button is pressed.

I am waiting for help - thanks in advance!
Attachment

Attachments: select.JPG (74.0k)

RE: Text in TLB_CREATE
Answer
2/5/18 12:47 PM as a reply to Anonymous.
Dear *,

your observation is correct: the size of the boxtext is limited by the size of the selection window. This means you  have 2 options:

a) Change the size of the window using the "min-w" parameter and align the text length with the size selected.
b) Provide the helptext in a button that shows the support message e.g. in an INFOBOX.

Please find below an example in AdoScript code that shows both adaptations. Have a look at the loopcondition (WHILE) that enables the Help button to be switched with the actual TLB.

Wilfrid


 1# create the main TreeListBox with all its parameters
 2CC "AdoScript" TLB_CREATE title:"My title" oktext:"Close" canceltext:"No way!"
 3                          boxtext:"This is a very long text to describe in detail the actions to be done and how to solve issues."
 4                          no-help:1 button-w:90
 5                          max-w:500 max-h:367 [b]min-w:500[/b] min-h:150 checklistbox:1
 6# insert some entries (as you like - ID should be unique)
 7CC "AdoScript" TLB_INSERT id:1 text:"Do this"
 8CC "AdoScript" TLB_INSERT id:2 text:"Do that"
 9# select the first entry (here: check it)
10CC "AdoScript" TLB_SELECT id:1 select:1
11# add a button: important is the name of the button as this is set to the endbutton variable to check agains
12CC "AdoScript" TLB_ADD_BUTTON name:"bt1" text:"Click me for help" index:1
13# and finally show it
14CC "AdoScript" TLB_SHOW
15# just to debug the endbutton
16CC "AdoScript" INFOBOX (endbutton)
17# this loop condition is important as it re-opens the TLB after showing the help text.
18WHILE (endbutton = "bt1") {
19   CC "AdoScript" INFOBOX "This is my very long helptext, that has \n\n line breaks and a lot of other stuff written here."   
20   # show again the TLB after the helptext
21   CC "AdoScript" TLB_SHOW
22}
23IF (ecode = 0) {
24  CC "AdoScript" INFOBOX ("Selected ids: " + selectedids + "\n" +
25                          "You pushed the following button: " + endbutton)
26} ELSE {   
27  CC "AdoScript" INFOBOX ("You cancelled the dialog!")
28}