Combobox , changing aitems dynimacaly

Combobox , changing aitems dynimacaly

Postby Frank Demont » Tue Oct 18, 2005 6:43 am

Hello,

I try to use comboxes , and change oCombox:aItems in the dialog.

I started with samples/Combox.prg , and try to change oCbx2:aItems (second combobox)

1)oCbx2:bGotFocus := ;
{|| oCbx2:aItems := { "1:One", "2:CHANGED", "3:Three" } }
The second combobox receives no visible focus , clicking shows the old items
bWhen shows focus , but the result is also bad

2) I tryed to use the VALID clausule from the first combobox :

VALID ( msginfo("ok") , oCbx2:aItems := { "1:One", "2:CHANGED", "3:Three" } , .T. )

BUT , THIS IS NOT EXECUTED , MSGINFO HAS NO EFFECT !!!!!!!!!

Frank
Frank Demont
 
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Re: Combobox , changing aitems dynimacaly

Postby Rimantas » Tue Oct 18, 2005 7:24 am

Frank Demont wrote:
I try to use comboxes , and change oCombox:aItems in the dialog.

I started with samples/Combox.prg , and try to change oCbx2:aItems (second combobox)

1)oCbx2:bGotFocus := ;
{|| oCbx2:aItems := { "1:One", "2:CHANGED", "3:Three" } }
The second combobox receives no visible focus , clicking shows the old items
bWhen shows focus , but the result is also bad

2) I tryed to use the VALID clausule from the first combobox :

VALID ( msginfo("ok") , oCbx2:aItems := { "1:One", "2:CHANGED", "3:Three" } , .T. )

BUT , THIS IS NOT EXECUTED , MSGINFO HAS NO EFFECT !!!!!!!!!

Frank


Try this codeblock :
@ nRow, nCol COMBOBOX oCbx VAR cPav PIXEL UPDATE VALID !empty( cPav ) OF oDlg SIZE n, nFh * 4

aeval( MyArray, { |x| aadd( oCbx:aItems, x[ 2 ] ) } ) // for multidimensional array .
or
aeval( MyArray, { || aadd( oCbx:aItems, MyArray ) } )

I'm changing my comboboxec at runtine in this way . Maybe it helps .

With best regards ! Rimantas
Rimantas U.
User avatar
Rimantas
 
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: karinha and 8 guests