Inserting the 2nd line into a listbox cause a double repaint of the line
- also in FWH . How can I to avoid this behavior.
Thanks in advance
Otto
listbox 2nd line
listbox 2nd line
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
Re: listbox 2nd line
Disturbing is that the listbox is opened without a scrollbar and after you insert the 2nd line the scrollbar is added.
On the PPC this makes an unstable impression to the user.
Best regards,
Otto
On the PPC this makes an unstable impression to the user.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Antonio Linares
- Site Admin
- Posts: 37485
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: listbox 2nd line
Otto,
Could you please provide a small and self contained PRG to reproduce it ? thanks
Could you please provide a small and self contained PRG to reproduce it ? thanks
Re: listbox 2nd line
Hello Antonio,
attached the source code to test.
Please use the customer.dbf from the samples and delete all records.
Then add 2 records with the test program . You will see that the second
record forces the browser to insert the vertical scrollbar and repaints the
listbox. On a slow device and if you have many controls on the screen this looks
instable.
I would prefer if the scrollbar would be there immediately when I start.
Best regards,
Otto
attached the source code to test.
Please use the customer.dbf from the samples and delete all records.
Then add 2 records with the test program . You will see that the second
record forces the browser to insert the vertical scrollbar and repaints the
listbox. On a slow device and if you have many controls on the screen this looks
instable.
I would prefer if the scrollbar would be there immediately when I start.
Best regards,
Otto
Code: Select all
// FiveWin for Pocket PC - Testing browses with incremental search
#include "FWCE.ch"
REQUEST DBFCDX
//----------------------------------------------------------------------------//
function Main()
local oWnd, oBrw, hBmp := ReadBitmap( CurDir() + "\go.bmp" )
local oSay, cSearch := ""
USE ( CurDir() + "\Customer" ) VIA "DBFCDX"
if ! File( CurDir() + "\LAST.CDX" )
INDEX ON Customer->Last TO ( CurDir() + "\LAST" )
endif
Customer->( OrdSetFocus( "LAST" ) )
Customer->( DbGoTop() )
DEFINE WINDOW oWnd TITLE "IncSearch"
@ 1, 1 LISTBOX oBrw ;
FIELDS hBmp, Customer->Last, Customer->First ;
HEADERS "", "Last", "First" ;
SIZE 220, 167
@ 12, 17 BUTTON "Add" SIZE 80, 30 ;
ACTION (addRec(),oBrw:gobottom(),oBrw:Refresh())
ACTIVATE WINDOW oWnd ;
ON CLICK MsgInfo( "Click!" )
return nil
//----------------------------------------------------------------------------//
function addRec
append blank
Customer->Last := "test"
Customer->First := "test"
return nil
//----------------------------------------------------------------------------//
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Antonio Linares
- Site Admin
- Posts: 37485
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: listbox 2nd line
Otto,
If you want the scrollbar to be shown since the beginning maybe you could have a dummy record added, like "items" or "please select" so you never have only one record.
Its a workaround for it, as a scrollbar does not allow to manage only one item. It has no sense. It is a Windows listbox control (with WS_VSCROLL style) limitation.
If you want the scrollbar to be shown since the beginning maybe you could have a dummy record added, like "items" or "please select" so you never have only one record.
Its a workaround for it, as a scrollbar does not allow to manage only one item. It has no sense. It is a Windows listbox control (with WS_VSCROLL style) limitation.
Re: listbox 2nd line
Hello Antonio,
Thank you for your answer.
But this workaround does not work well.
If I add only one record the flickering is there with the first I insert with the program.
If I start with 2 dummies on a pocket PC the screen is half full only with the dummies or does the new handy you are working on has such a big screen?
Best regards,
Otto
Thank you for your answer.
But this workaround does not work well.
If I add only one record the flickering is there with the first I insert with the program.
If I start with 2 dummies on a pocket PC the screen is half full only with the dummies or does the new handy you are working on has such a big screen?

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Antonio Linares
- Site Admin
- Posts: 37485
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: listbox 2nd line
Otto,
Don't use WS_VSCROLL in the listbox. Paint the up and down as bitmaps, beside the listbox, and use them to oListBox:Select() the previous or next item (oListBox:GetSel())
Don't use WS_VSCROLL in the listbox. Paint the up and down as bitmaps, beside the listbox, and use them to oListBox:Select() the previous or next item (oListBox:GetSel())
