how to shift panels dynamically - ibm-bpm

-----------------------
| Panel 1 |
-----------------------
| add | remove |
-----------------------
-----------------------
| Panel 2 |
-----------------------
| add | remove |
-----------------------
Is it possible to implement a logic whereby panel 2 shifts above panel 1 when both are initially opened, then panel 1 is removed and subsequently added by the add button in panel 2?

Related

Can the TopDockWidgetArea dock widgets in a vertical layout

The top dock widget area works like a Splitter in Horizontal orientation (with additionally stacking tab feature not relevant to this question) as such:
_____________________
| | | |
| A| B | C |
|___|_______|_________|
| | | |
| | | |
| | | |
|___|_____________|___|
| |
|_____________________|
Is it possible to make this dock area work like a Vertical QSplitter instead as:
_____________________
| A |
|_____________________|
| B |
|_____________________|
| C |
|_____________________|
| | | |
| | | |
|___|_____________|___|
| |
|_____________________|
I was very surprised that this is very easy to achieve.
Look into the DockWidget Example from Qt! There are some options for the DockArea. In the Mainwindow the options have to be applied:
setDockNestingEnabled(true)
Here is the documentation

In DevExpress, how do I change the value of a cell after the value of another cell is change?

I have a DevExpress.XtraGrid. I want the user to edit one of the columns and, after the edit is made, for the grid to update the value of another column. I tried using the event CustomRowCellEdit, but it threw an error whenever I added that event; I wasn't sure how to change the value of another cell anyway. Can someone explain how to do this?
So I've got a grid like this:
----------------
| A | B | C |
----------------
| 1 | 50 | 100 |
----------------
| 2 | 20 | 40 |
----------------
| 3 | 10 | 20 |
----------------
Let's say the user edits row 1, column B to be 25. After they make the change, I want row 1, column C to be twice what B is. So the end result is below where B1 is the value that is user entered and C1 is calculated based on the value in B1.
----------------
| A | B | C |
----------------
| 1 | 25 | 50 |
----------------
| 2 | 20 | 40 |
----------------
| 3 | 10 | 20 |
----------------
I tried this:
private void myView_CustomRowCellEdit_1(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e)
{
string newValue = e.CellValue.ToString();
int index = myView.GetDataSourceRowIndex(e.RowHandle);
myView.SetRowCellValue(index, "B", newValue);
}
but I don't think the "B" referred to the column correctly and I got a run time error with a null reference exception.
The GridView.CustomRowCellEdit event is intended to assign repository items to grid cells conditionally. For your case, it is necessary to handle the GridView.CellValueChanged event instead.
Refer to the Modify and Validate Cell Values help topic for more information.

Multi-line table cell in reStructuredText?

Is there a way to input a newline into a table cell? For example, say I have a table like this:
+==========+==========+==========+
+ Header 1 + Header 2 + Header 3 +
+==========+==========+==========+
+ Item 1 + + +
+ Item 2 + + +
+----------+----------+----------+
I want the above to create a table with two rows, three columns, and the second row, first column to display Item 1 and Item 2 on separate lines.
I have tried the line blocks syntax |, but it doesn't work inside a table cell. I can use list syntax, but I don't want bullet points to appear.
First of all I think your table syntax is incorrect, should it not be:
+----------+----------+----------+
| Header 1 | Header 2 | Header 3 |
+==========+==========+==========+
| Item 1 | | |
| Item 2 | | |
+----------+----------+----------+
Note that the top row is made up of hyphens, not equal signs, and the rows are separated by pipes, |, not plus signs.
Now with this table, the line block syntax:
+----------+----------+----------+
| Header 1 | Header 2 | Header 3 |
+==========+==========+==========+
| | Item 1 | | |
| | Item 2 | | |
+----------+----------+----------+
seems to work: testing with Pandoc the bottom left cell gets transformed into the following HTML:
<td align="left">Item 1<br />Item 2</td>
Note the line break <br /> in between Item 1 and Item 2.
You can also leave a gap between the lines like this
+----------+----------+----------+
| Header 1 | Header 2 | Header 3 |
+==========+==========+==========+
| Item 1 | | |
| | | |
| Item 2 | | |
+----------+----------+----------+
This method tends to be friendlier with editors so they dont think you have accidentally added an extra pipe
I use the following syntax to create tables including multiline cells with sphinx:
.. list-table::
* - **HEADER1**
- **HEADER2**
- **HEADER3**
* - TEXT 1
- | MULTILINE
| TEXT
- | MULTILINE
| TEXT 2
I use line blocks with beginning | to preserve the line-breaks.

referencing tables in restructuredtext

Is there anyway to refer a table in RestructuredText? something like see table `referencetable`_
(I saw some workarounds for referencing figures. couldn't find a way to refer a table though .. )
Thanks!
You can simply define a hyperlink target.
Here is table-1_.
.. _table-1:
+------------+------------+-----------+
| Header 1 | Header 2 | Header 3 |
+============+============+===========+
| body row 1 | column 2 | column 3 |
+------------+------------+-----------+
| body row 2 | Cells may span columns.|
+------------+------------+-----------+
| body row 3 | Cells may | - Cells |
+------------+ span rows. | - contain |
| body row 4 | | - blocks. |
+------------+------------+-----------+

android fragment backstack issue

My layout structure is as follows
Layout A
--------------------------------------
| ------------------------------- |
| | Layout B | |
| | | |
| | | |
| | | |
| ------------------------------- |
| |
| |
| |
--------------------------------------
Below layout B is another View.
Layout A contains a fragment F1 which in turn adds a fragment F11 in layout B
Now sometimes I want to replace fragment F11 in layout B with fragment F12 and sometimes I replace Fragment F1 in layout A with another fragment F2
As long as I'm replacing fragments inside layout B it's fine. But the main problem comes when I replace F1 with F2.
Consider the scenario where I have F11 inside F1. Now I replace F1 with F2. Now when I hit the back key F11 is not visible anymore. What is the problem here and How do I go about handling it
The behaviour of nested fragments is undefined, see #hackbod's answer here

Resources