Thread overview
Table.setHeaderVisible(true)does not work
Sep 09, 2008
Sam Hu
Sep 09, 2008
Frank Benoit
Sep 16, 2008
Olli Aalto
Sep 16, 2008
Frank Benoit
Sep 16, 2008
Olli Aalto
Sep 16, 2008
Frank Benoit
Sep 16, 2008
Olli Aalto
Sep 17, 2008
Sam Hu
September 09, 2008
Hi BB & Frank,

Sorry for so many questions to ask.As subjected,Table.setHeaderVisible(true) does not show the table header,below is the source:
//******************************
module testTable;

import dwt.DWT;
import dwt.widgets.Display;
import dwt.widgets.Shell;
import dwt.layout.FillLayout;
import dwt.widgets.Table;
import dwt.widgets.TableItem;
import dwt.widgets.TableColumn;

int main(char[][] args)
{

	Display display=new Display;
	Shell shell=new Shell(display);
	shell.setLayout(new FillLayout);

	Table table=new Table(shell,DWT.BORDER);


	TableColumn tbc1=new TableColumn(table,DWT.CENTER);
	tbc1.setText("First Name");
	tbc1.setWidth(100);

	TableColumn tbc2=new TableColumn(table,DWT.CENTER);
	tbc2.setText("Last Name");
	tbc2.setWidth(100);

	TableColumn tbc3=new TableColumn(table,DWT.CENTER);
	tbc3.setText("Address");
	tbc3.setWidth(120);

	table.setHeaderVisible(true);
	table.setLinesVisible(true);

	shell.open;

	while(! shell.isDisposed)
	{
		if(! display.readAndDispatch)
		display.sleep;
	}
	display.dispose;



	return 0;
}
//************************
I don't know why.
Thanks.
Sam
September 09, 2008
On Windows XP this works for me.
See attached Screenshot.




September 16, 2008
I got the same problem, while doing the IBM tutorial from the other thread. Did the part 1 and the only thing that didn't work was the table header.
I'm on XP, and I'm using quite recent version of DWT from the repo.
Probably from yesterday.

O.
September 16, 2008
Olli Aalto schrieb:
> I got the same problem, while doing the IBM tutorial from the other
> thread. Did the part 1 and the only thing that didn't work was the table
> header.
> I'm on XP, and I'm using quite recent version of DWT from the repo.
> Probably from yesterday.
> 
> O.

Then it is probably about your environment...

Which version of tango? Release or Svn (rev?) ?
Which DMD version?
This is WinXp 32 Bit ?
You used -version=TANGOSVN ?
You used the DWT sources directly or as a static lib?

Frank
September 16, 2008
Frank Benoit wrote:
> 
> Then it is probably about your environment...
> 
> Which version of tango? Release or Svn (rev?) ?
0.99.7
> Which DMD version?
1.033
> This is WinXp 32 Bit ?
yes
> You used -version=TANGOSVN ?
AFAIK, no.
> You used the DWT sources directly or as a static lib?
What DSSS provides. Static lib?

O.
September 16, 2008
Olli Aalto schrieb:
> Frank Benoit wrote:
>>
>> Then it is probably about your environment...
>>
>> Which version of tango? Release or Svn (rev?) ?
> 0.99.7
>> Which DMD version?
> 1.033
>> This is WinXp 32 Bit ?
> yes
>> You used -version=TANGOSVN ?
> AFAIK, no.
>> You used the DWT sources directly or as a static lib?
> What DSSS provides. Static lib?
> 
> O.

Does the snippet
dwt-samples/snippets/table/Snippet38.d
which has also table headers work for you?

Did you have the subsystem specified in your dsss.conf with one of:
    buildflags+= -L/SUBSYSTEM:windows:5
    buildflags+= -L/SUBSYSTEM:console:5

Did you link the dwt.res file?
    buildflags+= -L/rc:..\dwt
September 16, 2008
Frank Benoit wrote:
> Does the snippet
> dwt-samples/snippets/table/Snippet38.d
> which has also table headers work for you?
>

Yes.

> Did you have the subsystem specified in your dsss.conf with one of:
>     buildflags+= -L/SUBSYSTEM:windows:5
>     buildflags+= -L/SUBSYSTEM:console:5
> 

No, didn't even know about them until now. Adding either one fixes the problem.

> Did you link the dwt.res file?
>     buildflags+= -L/rc:..\dwt

No, see above about knowing. I added the dwt.res file from dwt-samples to my projects root folder and added -L/rc:dwt to buildflags. I didn't get any warnings/errors during build, but when the subsystem was set to console, and running the application I got some strange text to the console:

CreateActCtx failed, hence theme support will not be available
Please check for:
 - missing link option -L/su:windows:5 or -L/su:console:5
 - missing link option -L/rc:dwt
 - resource file 'dwt.res' was not accessible by linker
: An attempt to set the process default activation context failed because the process default activation context was already set.

It was nice to learn something new today. DWT seems to be in a pretty good shape. :)

O.
September 17, 2008
Ah, I got the same message since recent version of tango .997 and dwt from the first time I asked questions here-:)

> CreateActCtx failed, hence theme support will not be available
> Please check for:
>   - missing link option -L/su:windows:5 or -L/su:console:5
>   - missing link option -L/rc:dwt
>   - resource file 'dwt.res' was not accessible by linker
>