This might turn out to be further evidence that I should not work after 10 pm, but what the...
How do you exactly fit a listbox to a dialog? just declaring it as the same size as the dialog client does not seem enough, as this listbox drawn on a red dialog shows (V8 or V9) :
How do you exactly fit a listbox to a dialog? just declaring it as the same size as the dialog client does not seem enough, as this listbox drawn on a red dialog shows (V8 or V9) :
Code:
'fitting a listbox to a dialog #compile exe #dim all '#include once "WIN32API.INC" ' required for PBWin v8 callback function CB end function '----------------------- function pbmain () as long local hDlgLB as dword local i, lresult, n, X, Y, W, H as long X = 200: Y = 200: w = 100: H = 100 dialog new pixels, 0, "", X, Y, W, H,_ %ws_visible or %ws_popup or %ws_child or _ %ws_border or %ws_ex_toolwindow or _ %ws_ex_topmost or %ws_ex_controlparent to hdlgLB dialog set color hdlglb, -1, %red dialog get client hDlgLB to W, H control add listbox, hDlglb, 100,, _ 0, 0, W , H, _ %ws_child or %ws_visible or %ws_vscroll or %ws_hscroll or _ %lbs_notify or %lbs_hasstrings or %lbs_disablenoscroll, for i = 65 to 75 listbox add hDlgLB, 100, string$(10, i) next dialog show modeless hdlglb call CB to lresult do dialog doevents 2 to n loop until n = 0 end function
Comment