Welcome! Log In Create A New Profile

Advanced

[WD 28] TitleHeader

Posted by gpredl 
[WD 28] TitleHeader
May 27, 2023 06:09PM
Hi,

I suspect, I'm stuck on a bug. I'm trying to change properties of the Header of a Table column. The header has a single line. So, the Help System's suggested function to change the text size of a Table's column to 15pt would be:

MyTableName.MyColumnName..TitleHeader[1]..FontSize = 15

This is giving an error, saying:

1 is an invalid index
The values of the Table control must be between 1 and 0.


Any suggestions to fix that? I'll send an info to PC Soft Tech Support anyway .. we have two holidays ahead ..

Kind regards,
Guenter Predl
office@windev.at
Al
Re: [WD 28] TitleHeader
May 27, 2023 06:30PM
Hello Guenter,

I don't have V28 but did some investigating in V25 and it did not work there either but, in reading the help I saw a screen shot after the Syntax heading that showed the header with two rows.

The trick seems to be that you have to enable the heading and sub heading option in the table using the "edit title-headers of columns" option in the Details tab of the Table. Without having two header rows setup the [1] option has no valid reference as I imagine the header row would be 0

After setting up that option, it worked for me by nominating the actual column name as :
CREDITORCODE..TitleHeader[1]..FontSize = 15

Regards
Al
Al
Re: [WD 28] TitleHeader
May 27, 2023 06:54PM
Hello Guenter,

Kept playing around and may have a solution :

This code is in the Init of a table column. The code is from the TextToRTF help. I have no idea how they get the rtf tags into the string originally but it certainly works in the column caption
sTextInRTF is string
sTextInRTF = TextToRTF("WINDEV is a great tool" + CR +  ...
 "The development is child's play")
 
// sTextInRTF contains the string with the RTF tags: 
// {\rtf1\ansi\ansicpg1252\deff0{\fonttbl
// {\f0\froman\fcharset0 Times New Roman;} }
// {\*\generator WDTRAD 1.0;}
// {"WINDEV is a great tool\line 
// Development is child's play} }

MySelf..Caption = sTextInRTF

Regards
Al
Re: [WD 28] TitleHeader
May 28, 2023 07:13AM
Hi Al,

thanks a lot for your suggestion with the two header rows!!!! That's a great hint! I'll do a test with it and I'll report the outcome.

The project includes about 100 tables on a lot of windows and a single window that enables our customers to tweak each table to the user's needs and taste. Initially, it contained the means to tweak the row's font, fontsize, color, bold, next I offered the selection bar with background color and color of the selected text. This time I tried to play with the Table Header - only the background color thing worked.

Thank you!

Kind regards,
Guenter Predl
office@windev.at
Re: [WD 28] TitleHeader
May 28, 2023 08:35AM
Hi,

it works to a limited, but usable amount ...



Kind regards,
Guenter Predl
office@windev.at
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: