我一直在尝试构建一个简单的 GAE 应用程序并能够操纵屏幕上文本的位置。我在几个论坛上问过同样的问题;到目前为止还没有解决办法。如果我的问题不清楚,我深表歉意。
现在我想用网格来实现相同的功能,就像电子表格一样。你知道如何在 GAE 中模拟类似电子表格的表格吗?或者一个可以在每个单元格中输入字符串的 html 表格?
我觉得我正在尝试重新发明轮子。必须有一种简单的方法来实现此功能。我将不胜感激任何建议。
以下是之前问题的链接:
Stackoverflow
comp.lang.python
黑客新闻
黑客新闻
谢谢!
I've been trying to build a simple GAE app and to be able to manipulate the position of the text on the screen. I asked the same question on several forums; so far with no solution. I apologize if my question has not been clear.
Now I thought of achieving the same functionality with a grid, like a spreadsheet. Do you know how I can simulate a spreadsheet-like table in GAE? Or an html table where you can enter a string in each cell?
I feel like I am trying to re-invent the wheel. There must be a simple way to achieve this functionality. I would appreciate any suggestions.
Here are the links to previous questions:
Stackoverflow
comp.lang.python
Hacker News
Hacker News
Thank you!
发布评论
评论(3)
有一个名为 UI Table Edit 的 jquery 插件。这可能是一个很好的起点。深入挖掘已经实现的网格工具或 JavaScript 插件,它们已经为您完成了大部分工作。我认为雅虎!发布了一个很好的数据网格,它也允许编辑。
There is a jquery plugin called UI Table Edit. That may be a good place to start. Dig around for already implemented grid tools or plugins in javascript that have done most of the work for you. I think Yahoo! has released a nice data grid that allows for editing as well.
您正在寻找的是数据网格 - 如果您对客户端解决方案感到满意,并且准备使用 jQuery,那么您可以尝试 数据表。 这是一个带有一对插件来模拟电子表格的数据表示例。< /a>
What you are looking for is a data grid -- if you're fine with a client-side solution, and you're up for using jQuery then you might try DataTables. Here is an example of datatables with a pair of plugins to simulate a spreadsheet.
AbsolutePanel 和 LayoutPanel 是 GWT 的一部分,允许您将任何元素放置在任意 x 和 y 坐标处。对于任何可以使用 javascript 的严肃应用程序,我推荐一些客户端解决方案,例如 GWT。
如果您想仅使用 GAE 来解决此问题,而无需在客户端编写代码,则可以使用 CSS 定位< /a> 达到你的效果。只需生成一个带有position:fixed的top:和left:属性,你就可以使文本出现在任何地方。
我不确定“操纵文本位置”是什么意思,但如果您想要像素级控制,我认为表格不是一个好的解决方案。
AbsolutePanel and LayoutPanel are part of GWT and allow you to place any element at arbitrary x- and y-coordinates. I recommend some client-side solution like GWT for any serious application where javascript will be available.
If you want to solve this with just GAE and no code on the client side, you could use CSS positioning to achieve your effect. Just generate a top: and left: attribute with position:fixed and you can cause the text to appear anywhere.
I'm not sure what you mean by "manipulate the position of text," but I don't think a table will be a good solution if you want pixel-level control.