Mercurial > dwindows
comparison os2/dw.c @ 819:2dd7638a7719
Fix for some dw_container_change_item() misbehavior... was functioning the same as dw_container_set_item().
Also added dw_container_change_row_title() which performs the same task as dw_container_set_row_title() on inserted items.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 26 Mar 2011 12:49:59 +0000 |
parents | 388f2a48aaae |
children | eaaef18d5b21 |
comparison
equal
deleted
inserted
replaced
818:c17634e2b303 | 819:2dd7638a7719 |
---|---|
7273 temp->pszName = title; | 7273 temp->pszName = title; |
7274 temp->pszText = title; | 7274 temp->pszText = title; |
7275 } | 7275 } |
7276 | 7276 |
7277 /* | 7277 /* |
7278 * Changes the title of a row already inserted in the container. | |
7279 * Parameters: | |
7280 * handle: Handle to the container window (widget). | |
7281 * row: Zero based row of data being set. | |
7282 * title: String title of the item. | |
7283 */ | |
7284 void API dw_container_change_row_title(HWND handle, int row, char *title) | |
7285 { | |
7286 PRECORDCORE pCore = WinSendMsg(handle, CM_QUERYRECORD, (MPARAM)0L, MPFROM2SHORT(CMA_FIRST, CMA_ITEMORDER)); | |
7287 int count = 0; | |
7288 | |
7289 while(pCore) | |
7290 { | |
7291 if(count == row) | |
7292 { | |
7293 pCore->pszIcon = title; | |
7294 pCore->pszName = title; | |
7295 pCore->pszText = title; | |
7296 | |
7297 WinSendMsg(handle, CM_INVALIDATERECORD, (MPARAM)&pCore, MPFROM2SHORT(1, CMA_NOREPOSITION | CMA_TEXTCHANGED)); | |
7298 return; | |
7299 } | |
7300 pCore = WinSendMsg(handle, CM_QUERYRECORD, (MPARAM)pCore, MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER)); | |
7301 count++; | |
7302 } | |
7303 } | |
7304 | |
7305 /* | |
7278 * Sets the title of a row in the container. | 7306 * Sets the title of a row in the container. |
7279 * Parameters: | 7307 * Parameters: |
7280 * handle: Handle to the container window (widget). | 7308 * handle: Handle to the container window (widget). |
7281 * pointer: Pointer to the allocated memory in dw_container_alloc(). | 7309 * pointer: Pointer to the allocated memory in dw_container_alloc(). |
7282 * rowcount: The number of rows to be inserted. | 7310 * rowcount: The number of rows to be inserted. |