Difference between revisions of "Child tables"
DaveRabelink (Talk | contribs) (Added sample to tip on removing dropdownlist window from taskbar) |
|||
Line 63: | Line 63: | ||
Here you can download a sample: | Here you can download a sample: | ||
*[http://samples.tdcommunity.net/index.php?dir=&file=WIKI_DropDownColumn_NoWindowInTaskbar.zip WIKI_DropDownColumn_NoWindowInTaskbar.zip]<br> | *[http://samples.tdcommunity.net/index.php?dir=&file=WIKI_DropDownColumn_NoWindowInTaskbar.zip WIKI_DropDownColumn_NoWindowInTaskbar.zip]<br> | ||
+ | <br> | ||
+ | |||
+ | |||
+ | <!------------------------------------------------------------------------------------------------------------------------------> | ||
+ | |||
+ | {{TipHeader|Double Height column headers}} | ||
+ | It wasn't obvious to me that this could be done but the business analyst really wanted it for her screen design. A coworker remembered how she had done it once: Just embed a newline in the column title and Gupta handles it automgically. Works at design time, just embed ctrl/enter in the column's "Object Title" property, or at run time using SalTblSetColumnTitle()<br> | ||
+ | <br> | ||
+ | <pre>Call SalTblSetColumnTitle ( tblX.columnN, "Column header part 1 | ||
+ | column header part 2" )</pre><br> | ||
<br> | <br> |
Revision as of 17:20, 15 April 2011
This page covers ChildTable tips & tricks.
Contents |
What message is send when a DropDown column item is selected (clicked) 
When an item from a column dropdown list is selected, the message SAM_AnyEdit is send to the column message actions section.
How to hide the window displayed in the taskbar when a column dropdown list is opened 
When you open the dropdown list of a table column, a window is shown on the Windows taskbar.
To get rid of this window use this code under the message actions of the table column
First declare these three WinApi functions in the external functions section
Library name: USER32.DLL Function: FindWindowA Export Ordinal: 0 Returns Window Handle: HWND Parameters String: LPCSTR String: LPCSTR Function: GetWindowLongA Export Ordinal: 0 Returns Number: LONG Parameters Window Handle: HWND Number: INT Function: SetWindowLongA Export Ordinal: 0 Returns Number: LONG Parameters Window Handle: HWND Number: INT Number: LONG
Also declare these constants
Number: GWL_EXSTYLE = -20 Number: WS_EX_TOOLWINDOW = 0x80
Here the actual code for removing the window from the taskbar
On SAM_DropDown Set hWndDropDown = FindWindowA( "Gupta:DropDown", "" ) If NOT hWndDropDown ! Maybe it is an older TD version, so search for another classname Set hWndDropDown = FindWindowA( ":DropDown", "" ) If hWndDropDown If NOT GetWindowLongA( hWndDropDown,GWL_EXSTYLE ) & WS_EX_TOOLWINDOW Call SetWindowLongA( hWndDropDown, GWL_EXSTYLE, GetWindowLongA( hWndDropDown,GWL_EXSTYLE ) | WS_EX_TOOLWINDOW )
Here you can download a sample:
Double Height column headers 
It wasn't obvious to me that this could be done but the business analyst really wanted it for her screen design. A coworker remembered how she had done it once: Just embed a newline in the column title and Gupta handles it automgically. Works at design time, just embed ctrl/enter in the column's "Object Title" property, or at run time using SalTblSetColumnTitle()
Call SalTblSetColumnTitle ( tblX.columnN, "Column header part 1 column header part 2" )