|
Post by Walt Decker on Jan 14, 2023 18:02:02 GMT -5
No. I am saying that the first STYLEBITS should NOT BE IN YOUR CODE. I am saying that there IS NO WM-EX-topmost style. I am saying that _ES_AUTOHSCROLL is an edit control(EDIT BOX) style and has nothing to do with a list box. I am saying that the only STYLEBIT statement for your list box should be: STYLEBITS #edit.lb1, _WS_HSCROLL, 0, _WS_EX_TOPMOST, 0 I am saying that unless you send the little code snippet I provided the horizontal scroll bar will not work even though it is in your list box.
I would also advise you to click on the graphic to make sure that it DOES NOT come to the foreground and obscure your list box.
|
|
|
Post by mknarr on Jan 16, 2023 10:45:46 GMT -5
This code loadbmp "frame", DefaultDir$+"\bmp\frame.bmp" WindowWidth = 700 WindowHeight = 710 BackgroundColor$ = "buttonface" ForegroundColor$ = "black" graphicbox #edit.gfb1, 15, 0,370,520 listbox #edit.lb1, ListBox$(), [lbselect], 60, 45, 280, 435 stylebits #edit.lb1,0,0, WM-EX-topmost,0 stylebits #edit.lb1,_WS_HSCROLL,_ES_AUTOHSCROLL,0,0 'STYLEBITS #edit.lb1, _WS_HSCROLL, 0, _WS_EX_TOPMOST, 0
works as expected. Hers is a picture of the listbox with the frame and you can see the horizontal scrool bar and clicking on the border does nothing.  This code to the best I can tell works exactly the same and again clicking on the border does nothing. loadbmp "frame", DefaultDir$+"\bmp\frame.bmp" WindowWidth = 700 WindowHeight = 710 BackgroundColor$ = "buttonface" ForegroundColor$ = "black" graphicbox #edit.gfb1, 15, 0,370,520 listbox #edit.lb1, ListBox$(), [lbselect], 60, 45, 280, 435 'stylebits #edit.lb1,0,0, WM-EX-topmost,0 'stylebits #edit.lb1,_WS_HSCROLL,_ES_AUTOHSCROLL,0,0 STYLEBITS #edit.lb1, _WS_HSCROLL, 0, _WS_EX_TOPMOST, 0
|
|
|
Post by Rod on Jan 17, 2023 6:37:23 GMT -5
Liberty is by design, simple. Carl made choices that mean most controls and the way they are presented really need no API tweaking. This code seems to do what you ask.
nomainwin WindowWidth = 700 WindowHeight = 710 BackgroundColor$ = "buttonface" ForegroundColor$ = "black" graphicbox #edit.gf, 15, 0,370,520 listbox #edit.lb, ListBox$(), [lbselect], 60, 45, 280, 435 open "Menu" for window as #edit #edit.gf "down ; fill blue ; flush bac" dim ListBox$(200) for n=1 to 200 ListBox$(n)="Recipe number ";n next #edit.lb "reload" wait
|
|