Although I set the text property of jdbCheckBox to null or empty string, jdbCheckBox shows the column name in text when running the project

By: hong zhao

Abstract: jdbCheckBox shows the column name in text although I set the text property to null or empty string


Question:

Although I set the text property of jdbCheckBox to null or empty string, jdbCheckBox still shows the column name in text when running the project
 
Answer:


In the JBuilder help, it states: "JdbCheckBox sets its text, alignment, background, foreground, and font properties using the property settings from the Column specified with the columnName property, if they are defined, unless these properties are set explicitly on the JdbCheckBox itself. The value of the text property is considered to be its default state (not explicitly set) if text is null or an empty string (""). "

So it's designed like this, but there're some workarounds:

1. Put some spaces in the text property.

2. Chang the order of setColumnName() & setText().

3. Subclass the checkbox and overwrite the method. Try something like: datasetYouAreUsingForCheckbox.getColumn(columnName).setCaption("captionYouWantForCheckBox");

 

Server Response from: ETNASC01