Problems in a form after importing data cells and rectangles

This was originally posted as a reply to Rico’s post (Random data cells are empty …) but it’s clearly a different issue so I’ve put it up again under a new heading.

If I select a field in the data sheet, then open a form containing a data cell for every field, no data is shown in the selected field. When I click in the data cell, the value appears.

If some or all of the data cells on the form overlay a rectangle, an additional problem emerges - whenever I click on a data cell which overlaid a rectangle in Pan6, the value disappears. Clicking on another accompanied cell makes the new value vanish and the previous one reappears.

This second problem does not occur with data cells that did not overlay a rectangle in Pan6. Adding a rectangle in Pan X does not cause the same behaviour.

michael

Visit Topic or reply to this email to respond

To stop receiving notifications for this particular topic, click here. To unsubscribe from these emails, change your user preferences

@michael Do you have Dropbox? If so, you could post a link here to your test database.

Here’s my test file. Start in the data sheet with all forms closed. Open a form, click on its data cells and see what happens. Close the form and try another one.

m

The Dropbox link is

https://dl.dropboxusercontent.com/u/1942634/PanX%20conversion%20tester.pandb.zip

m

Something I noticed that may or may not be related to this problem involves using the field command from a procedure while a form is the frontmost window. The datasheet will not recognize this command if a form is frontmost but it will if the datasheet is the frontmost window. I believe this is related to issue #518 and may actually be the way this is suppose to work.

As far as Michael’s problem is concerned I can only offer a temporary workaround. With your form in graphics mode, go to the first tab in the Properties panel (“Form Properties”) and go to the very bottom to the “Form Event Procedure” area. Enter field info(“fieldname”) as the code and hit enter. Now when the form is opened it should display the data in the current field instead of being blank. Just don’t ask my why this works.:upside_down:

Yes, this is how it is supposed to work. The field command is only supposed to affect the current window. So the data sheet has a current field, and each form has an independent current field.

Thanks Gary - that solves the first problem but not the second - got any more magic bullets? How on earth did you come up with that tweak???

These issues cropped up as a by-product of converting Pan6 push buttons to PanX rectangles overlaid with text. No programmatic changes were made to the data cells in rectangles but the problems arise with every conversion (well, every one that I’ve tried) so it’s something Jim will want to look at.

I can easily add a bit of code to the push button conversion procedure to include your fix. All I need now is a solution to the other bug.

michael

Good question - I don’t know, shot in the dark or pot luck I guess. I try a lot of odd ball things that sometimes pays dividends.

I’m really not sure exactly what I would be looking for so I probably would need an example file that showed the problem more clearly. Even then I might not be of much help since it might be a real bug that Jim would have to address.

The file is at

https://dl.dropboxusercontent.com/u/1942634/PanX%20conversion%20tester.pandb.zip

Start in the data sheet with no forms open, open the form, “Test form backup” and click in several data cells. The value in the one you click in should disappear and a previously hidden one should appear. Does it do that for you?

m

The solution is to make all of the background rectangles Hollow rather than Outline. This is a useful work-around but it alters the aesthetics significantly and the underlying cause needs to be addressed.

michael

… and, if I make the overlying text object Outline, the problem re-emerges.

m

Yes, I see that strange behavior as well. I do have one question however, and that is why do you need a rectangle behind the TextEditObject at all? Why not just set the boarder to “line” in the Options panel? Wouldn’t that give the same appearance and avoid the problem all together?

They’re not text, they’re data cells and I Know of no way to give them a white background with a black border, which is the preferred appearance.

m

Well, unless I’m totally mistaken, your “data cells” have been converted to Text Edit Objects in Panorama X. In the Measurements panel for the object under Class you will see TextEditObject listed if you select one of them. Then, in the Options panel, you can set the boarder to “Line”. I don’t think there are data cells as such anymore in Pan X.

Gary, I don’t think you’ve ever been totally mistaken where Panorama is concerned!

You are right of course - I was fooled by the fact that, in the Name box, it says CELL very prominently. No matter what class it is, it looks like a data cell and it acts like a data cell.

Nevertheless, my problem is that I have used the “data cell on a white rectangle” for data entry and display in hundreds of Pan 6 databases and I want a simple way to replicate that during any import to Pan X. It seems that I can’t until the Outline/Hollow issue is fixed. Also, I see no way to replicate it manually in Pan X. Mind you, I could be totally mistaken :slight_smile:

michael

Evidently Panorama X coverts the Pan 6 data cell into a TextEditObject and names it “CELL”. I was able to produce a colored background on the form with white background Text Editor Objects as I think you want without the disappearing text. The trick I used was to create a bunch of colored rectangles that I placed along the sides, top, bottom and between the problem objects and all sent to the back. This meant that there were no rectangles under these objects at all. Not the easiest of fixes depending upon how many forms and Text Editor Objects are involved and their arrangement but it seems to work.

I’ve written a procedure (actually, I pinched it from Tom Cooper) to change all offending boxes to hollow and that will have to do until Jim fixes the root problem. I have far too many forms to even think about manual fiddling.

But thanks for the thought.

michael

Michael, after looking again with fresh eyes, I can see there is a more up-to-date GUI scheme that will achieve a similar result to what you might be looking for. If you uncheck the “Pop Up Editing” box and then check the “Focus Ring” box and the the “Tab” box under Termination Keys for each Text Editor Object you will be able to have the white background rectangle under each TEO on a colored form background. Now when a TEO is clicked on or tabbed into, it will be highlighted with a blue focus ring and opened for editing. All the disappearing problems are eliminated and you will have a more conventional looking form as well.

I made a sample test file to show this look: Tester.pandb.zip

If you think this could work for you, here is the code that will automatically change every Text Editor Object on the form to the new format.

changeobjects "$TextEditorTabCycle","1",
    "$TextEditorFocusRing","1",
    "$TextEditorTerminateTab","1",
    "$TextEditorPopUpEditing","0",
    "$TextEditorBorderStyle","Line",
    "$Fill","Hollow"
selectnoobjects```

Aha! That looks to have possibilities. I’ll check it out later today. Thanks as always Gary.

m

That’s certainly works and it’s a better way to do the job. You are now the go-to expert on this sort of thing.

One thing baffles me (actually, there is an endless list of things …) - under the tab, I can change the color value but it appears to have no effect on anything and moving to Data Mode and back to Graphics Mode resets it to blue - what’s the story?

michael