I am experimenting with the MSFlexGrid on a form. I want to create a text box and place it on top of the grid. I can create the textbox, no problem, but it always shows up underneath the MSFlexGrid. How do I get it to show up on top of the grid?
Bill,
You can try to change it by selecting the textbox, then in the Menu -> Format -> Bring to Front. However some non-native controls will play with the ZOrder at runtime.
That is exactly what happened. Ideally, I'd like to do an addobject, but just to see if it would work I placed a textbox on the form in design time and the textbox was on top, but when I ran it, the textbox dropped behind the grid.
I've also tried setting the z-order at runtime with thisform.grdNewGrid.zorder(1) & thisform.txtEntry.zorder(0), but that didn't work either. Oh well.
I've found that ActiveX controls don't "play nice" with the ZOrder of anything. I like embedding an Internet Explorer window on a form, but you can't put anything in front of it or intercept its default keystrokes. The most annoying this is that it grabs all ESC keypresses and doesn't let my program process them.
I'm interested in this one too. To get the text box on top, could I do something like this, and where would I put the code?
define window w_testbox from 2,14 to 4,54 ;
in screen ;
system ;
float ;
title ' SELECT VENDOR'
activate window w_textbox
?? ' Vendor ID..................'
@ 0,29 get lcVendorID picture '@!'
read
deactivate window w_textbox
release window w_textbox
This would create the text box at run time instead of design time. This would work on a browse window or a form but don't know about a grid. Is there a way to do this that is a little more object oriented? (When you read this, you will probably figure out how old the program is I got it from.)
Create a container or a single page pageframe for the activex grid and put the activex on the container/pageframe. Now controlling the zorder of the pagefrome/container vis a vis the text box solve the problem. I havent tested this yet, but I feel this shall solve your problem. ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
It took me a while to back to this, so obviously it isn't too important.
I tried putting the msflexgrid inside a container and setting the zorder to 1 for the container and 0 for the text box and now the textbox shows up on top of the container but still under the grid.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.