Home » Community » Newbie corner » chess like drag&drop possible in u++ ?
Re: chess like drag&drop possible in u++ ? [message #28846 is a reply to message #28845] |
Sun, 19 September 2010 14:37 |
|
kenton wrote on Sun, 19 September 2010 14:12 | The simplicity of this example amazed me !!
| U++ still amazes me too, even after couple of years of using it
kenton wrote on Sun, 19 September 2010 14:12 | - It's possible to view and edit the .lay file ?
| That's what is layout editor in theide for. Just open the file and you should see a graphical representation of the layout (if you see only text, try pressing Alt+T). Here you can add/remove/manipulate widgets as you wish. Have a look at the GUI tutorial, it should explain a lot.
kenton wrote on Sun, 19 September 2010 14:12 | - In the example we have a 2x2 matrix of "Tile" class, overrided from "ctrl" one. In my application the matrix will be nXn dependent to parameters gived by user runtime. So my question is: this 2x2 scheme is fixed or can be changed continuously runtime ?
| Yes the widgets can be added/removed/changed at runtime as you wish. You can start with layout from .lay file and modify it in the code, or you can build everything in code. For this app, you probably won't use the lay file for the grid, it was just an example. There are even other choices, like having another widget that would represent the grid (containing and managing the variable number of Tiles), so you would then put only this "master-widget" into the layout. The possibilities are endless in U++
If you wan't something like the layout editor, it is of course possible. After all, the layout editor is written in U++ as well My guess is that you don't need it to be that complex, so maybe a context menu with options like "add box" would be sufficient... But you are the designer and you choose how you want the app to behave. U++ is very flexible and will let you do anything.
Honza
|
|
|
Goto Forum:
Current Time: Thu May 23 07:33:21 CEST 2024
Total time taken to generate the page: 0.02422 seconds
|