2015-10-14 00:24 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)

This commit is contained in:
Alexey Myronenko
2015-10-27 15:40:32 +02:00
parent 2a743e15e1
commit f7cb8a441d
3 changed files with 26 additions and 2 deletions

View File

@@ -39,6 +39,13 @@
! enable socket type translation for Linux/MIPS, enum order is different
there - fixes TCP/IP socket binding on such platform
2015-10-14 00:24 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
* src/rtl/achoice.prg
+ tests/achoice5.prg
! AChoice(): fix visual glitch and/or RTE in certain conditions
Patch and sample by Alexey Myronenko
Ref: https://groups.google.com/d/topic/harbour-devel/G9j6WXFFwW4/discussion
2015-10-13 23:05 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbwince.h
* src/common/hbwince.c

View File

@@ -281,7 +281,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo
CASE nKey == K_CTRL_PGDN .OR. ( nKey == K_END .AND. ! lUserFunc )
IF nPos == nLastItem
IF nAtTop == Min( nLastItem, nItems - nNumRows + 1 )
IF nAtTop == Min( nLastItem, nItems - Min( nItems, nNumRows ) + 1 )
nMode := AC_HITBOTTOM
ELSE
nAtTop := Min( nLastItem, nItems - nNumRows + 1 )
@@ -323,7 +323,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo
CASE nKey == K_CTRL_END
IF nPos == nLastItem
IF nAtTop == Min( nPos, nItems - nNumRows + 1 ) .OR. nPos == nItems
IF nAtTop == Min( nPos, nItems - Min( nItems, nNumRows ) + 1 ) .OR. nPos == nItems
nMode := AC_HITBOTTOM
ELSE
nAtTop := Min( nPos, nItems - nNumRows + 1 )

17
tests/achoice5.prg Normal file
View File

@@ -0,0 +1,17 @@
#include "inkey.ch"
PROCEDURE Main()
LOCAL nb
// hb_keyPut( { K_END, K_END, K_UP, K_HOME } ) // Visual glitch
// hb_keyPut( { K_CTRL_END, K_CTRL_END, K_CTRL_HOME } ) // RTE
CLS
nb := 20
DispBox( 4, 9, nb + 1, 51,, "W+/B,N/BG" )
AChoice( 5, 10, nb, 50, ;
{ "menu 1", "menu 2", "menu 3", "menu 4", "menu 5", "menu 6", "menu 7", "menu 8", "menu 9", "menu 10" }, ;
{ .T., .T., .T., .T., .F., .F., .F., .T., .F., .F. } )
RETURN