[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]] ==== Pushbutton in an edittable (OpenInsight Specific) ==== === At 01 JUL 1998 09:30:36AM Don Bakke wrote: === {{tag>"OpenInsight Specific"}} We have created a pushbutton on a form that looks like a small drop-down combo box button. We are dynamically moving this so that certain cells of an edittable look as if they have a drop down feature (i.e. this button is placed to the far right of the cell). So far, so good. The problem with this is that even though the button is visible, it never gets focus. Only the edittable ever gets focus. I've tried destroying the button and re-creating it, setting the edittable as the parent (which won't even cause the button to appear), and simply setting the FOCUS to the button programmatically. Nothing has worked. Unless I get a brainstorm, I will resort to creating a floating dialog box...but I'd rather just keep the control on the actual form itself. Any ideas? TIA. dbakke@srpcs.com [url=http://www.srpcs.com]SRP Computer Solutions[/url] [img]http://www.srpcs.com/srpicon1.gif[/img] ---- === At 01 JUL 1998 10:22AM Scott Kearney wrote: === Don, Setting Focus to the button should definitely give it focus, but it might not generate a gotfocus event. Are you trying to have the button be the currently selected item on the form, so that if you hit enter, you execute it? Or are you just trying to trigger its events? If the latter, try sending a gotfocus to it.. -Scott Revelation ---- === At 01 JUL 1998 11:41AM DSig (SigSolutions) wrote: === Don, in setting focus are you using SYSTEM? This might force the button to appear. dsig David Tod Sigafoos ~ SigSolutions dsig@teleport.com cis:70302,77 voice:503-639-8080 ---- === At 02 JUL 1998 12:09PM Don Bakke wrote: === Scott and DSig, Setting the focus programmatically is not my goal, that's just something I tried to see if getting focus were even possible. Since this button is supposed to make the cell look and work like a drop down combobox, I only want the button to get focus when the end user clicks on it. But therein lies the problem. Even though the button is plainly visible (in the middle of this edittable), clicking on it only places the cursor in the edittable...even though the button is still visible the whole time. I only half expected this to work knowing that overlapping controls gives unexpected results most of the time. This would have been a cool way to provide "enhanced" usability to the edittable, even if it is simulated. dbakke@srpcs.com [url=http://www.srpcs.com]SRP Computer Solutions[/url] [img]http://www.srpcs.com/srpicon1.gif[/img] ---- === At 02 JUL 1998 02:34PM Cameron Revelation wrote: === Don, It sounds like you may need to make some sort of "bring to front" or "make topmost" call in the Windows API. BOOL BringWindowToTop(hwnd) BOOL SetWindowPos(hwnd, hwndInsertAfter, x, y, cx, cy, fuFlags) ... where hwndInsertAfter==HWND_TOP Places the window at the top of the Z-order. Cameron Purdy Revelation Software ---- === At 03 JUL 1998 08:46AM Don Bakke wrote: === [i]BOOL BringWindowToTop(hwnd)[/i] This did the trick, thank you very much Cameron. dbakke@srpcs.com [url=http://www.srpcs.com]SRP Computer Solutions[/url] [img]http://www.srpcs.com/srpicon1.gif[/img] ---- === At 04 JUL 1998 05:36PM Cameron Revelation wrote: === Cool! Cameron Purdy Revelation Software [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=E00C3EF58895446285256634004A3678|View this thread on the forum...]]