Does anyone have a small demo of filling a ListView with PB9?
Just want to fill some rows and columns with text.
Just want to fill some rows and columns with text.
[FONT=courier new][FONT=courrier new][FONT=courier new]ROWID FIRST NAME LAST NAME[/FONT][/FONT][/FONT] [FONT=courier new][FONT=courrier new]----- ---------- ---------[/FONT] [FONT=courier new][FONT=courier new]1 Joan Crawford [/FONT] [FONT=courier new]2 Marilyn Monroe[/FONT] [FONT=courier new]3 Homer Simpson[/FONT] [/FONT][/FONT]
FUNCTION DisplayRecordSet(hDlg AS DWORD) AS DWORD LOCAL row AS DWORD, col AS LONG, ColumnCount AS LONG ColumnCount = slGetColumnCount 'SQLitening IF ColumnCount THEN MOUSEPTR 11 LISTVIEW RESET hDLG, %IDC_LISTVIEW FOR col = 1 TO ColumnCount 'Insert columns with column names LISTVIEW INSERT COLUMN hDlg, %IDC_LISTVIEW,col,slGetColumnName(col),100,0 NEXT ELSE ? "No columns" EXIT FUNCTION END IF DO WHILE slGetRow INCR row LISTVIEW INSERT ITEM hDlg, %IDC_LISTVIEW,row, 0 , slF(1) 'Insert row, 0=no image FOR col = 2 TO ColumnCount 'add text into columns LISTVIEW SET TEXT hdlg, %IDC_LISTVIEW, row, col,slF(col) IF row =40 OR (row MOD 500) = 0 THEN CONTROL SET TEXT hDlg, %IDC_LABEL1, "Records for far" + STR$(row) DIALOG DOEVENTS:SLEEP 10 END IF NEXT LOOP DIALOG DOEVENTS MOUSEPTR 1 FUNCTION = row END FUNCTION
DO WHILE slGetRow .... IF row =40 OR (row MOD 500) = 0 THEN
CONTROL SET TEXT hDlg, %IDC_LABEL1, "Records for far" + STR$(row) DIALOG DOEVENTS:SLEEP 10
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment