Simple question : how can I make the inline CKEditor toolbar float top right (or bottom right) of my editable element instead of the default top left position ?
Have been googling it but no luck so far :(
Thank you
It does not have a configuration option for this. There are only four options for the X,Y offset in pinned and docked modes - e.g. config.floatSpacePinnedOffsetY.
The only idea that I have is implementing your own plugin like Floating Space, or modifying the current implementation.
And as the last resort, you can use the Shared Space plugin to place the toolbar in a container chosen by you and then position it as you wish. Check the second demo (Inline Editor with Shared Toolbar and Bottom Bar) on the SDK sample page for an example.
we can do it with floatSpacePreferRight config
only we need to set
config.floatSpacePreferRight = true;
default value of floatSpacePreferRight is false;
so with this configuration, we can align inline toolbar position to right
Related
On my frame window I have a CReBar control with non-movable bands on several lines. On the last line there are two bands, which currently aligned to the left, the second immediately after the first.
+--------+-------+------------------------------------+
|11111111|2222222|
+--------+-------+------------------------------------+
But my product management wants me to attach the second band to the right side of the line, with empty space in the middle.
+--------+------------------------------------+-------+
|11111111| |2222222|
+--------+------------------------------------+-------+
I cannot find anywhere how to do that. I would be grateful for any help.
Edit:
The actual code uses the Xtreme GUI library, but its structure is pretty standard:
// ... Create toolbars
// Add toolbars to ReBar.
if (m_wndReBar.Create(this) &&
m_wndReBar.AddToolBar(pNavigateTB, RBBS_BREAK | RBBS_NOGRIPPER) &&
m_wndReBar.AddBar(&m_wndAddressBar, NULL, NULL, RBBS_NOGRIPPER) &&
m_wndReBar.AddToolBar(pMainToolBar, RBBS_BREAK | RBBS_NOGRIPPER) &&
m_wndReBar.AddToolBar(pViewsHelpTB, RBBS_NOGRIPPER))
{
...
}
Here m_wndReBar is a CReBar-derived class, and toolbars are Xtreme wrappers of the common Toolbar control. They use the regular MFC flags, and I didn't find an option to align toolbar to the right.
There is no style or parameter of a toolbar, which forces it to align to the right. However, it is possible to expand the previous toolbar in a way that it will push the subsequent toolbar to the rightmost position.
Let, as in the first figure above, two consecutive toolbars are on the same line in the CReBar, and the first toolbar has index I. Than the command
m_ReBar.SendMessage(RB_MAXIMIZEBAND, I, 0);
will move the second toolbar to the right, as in the second figure. This rightmost position will be kept during the window resizing, but adding a new toolbar to the rebar can break it.
I am developing an MFC dialog based application and when I maximize the dialog, empty space is added to "right and bottom" of controls. This is because controls have default anchoring position set to TOP-LEFT.
I want the empty space to be added to "left and bottom" of controls means all the controls present in dialog need to be at same distance from right and top of dialog. Also, I do not want to expand the size of control.
So, Is there any way to change the default anchoring of controls to TOP-RIGHT?
PS : There are so many controls on dialog and I do not want to change the property of each one. A common method/property for all is required.
Thanks in advance!
I am using a ZedGraphControl in a WindowsForms project in C#. The ZedGraphControl is V5.1.5.
The data in the control is static and I add it all before the form is shown. The X axis of the data consists of numbers indicating seconds offset from the beginning. in other words from 0 to some number of seconds.
I want to initially show the last 5 seconds, but provide a horizontal scrollbar so the user can scroll back and forth. I set the "graphPane.XAxis.Scale.Max = maxX;" where maxX is the largest X value in my data. I set the "graphPane.XAxis.Scale.Min = maxX - 5;".
The data starts off displaying the way I want it, but when the user scrolls the horizontal bar, bizzar behavior occurs.
As you drag the thumb of the scrollbar to the left, the beginning of the data shown in the grid moves to the lower values as expected, and the thumb of the scrollbar moves to the left, but the right edge of the thumb stays at the right of the scrollbar and you cannot move back to the right. It is as if the data to the right of the viewing range gets truncated as you scroll left.
I cannot find any reason for this nor any way to control it. Does anyone have any ideas about this behavior?
Ok, found it myself.
I found a fine article that describes scrolling:
Add a ScrollBar
In it the author specifically says "the scrolling will be wacky because the scrollable range has not been set".
I used the sample "Manually Setting the Scroll Range" and the part that I was missing is setting the zedGraphControl1.ScrollMinX and zedGraphControl1.ScrollMaxX properties. Once I defined these values everything started working as expected. I also found that in my case, the value of zedGraphControl1.IsAutoScrollRange had no effect, but I left it set to false to be consistent with the example. This would probably have an effect if the dataset is dynamic.
I'm getting started with Windows 8 App development using WinJS. I'm using the Light UI theme but I have set up a darker area on the left of the page (where the black back button is) and the issue is: you can't see the button.
I've trawled through the MSDN pages and the most I could find is how to style a button which doesn't actually explain how to change the colour of an actual asset.
http://msdn.microsoft.com/en-us/library/windows/apps/jj835822.aspx
I've also tried adding: win-ui-light and win-ui-dark classes to the button with no success.
I wondered if someone could point me in the right direction?
Many thanks for your time
Chris
First of all you have to delete the link tag that contain UI css by default and add it to document head , Dynamically.see below code :
var uistyle;
// call when your app load or resume.
function onappopen(){
uistyle = document.createElement('link');
uistyle.href = "//Microsoft.WinJS.2.0/css/ui-dark.css";
uistyle.rel = "stylesheet";
uistyle.id = "UIstyle";
document.head.appendChild(uistyle);}
// call when you want to change UI Style.
function UIstyle(UIbool){
if(UIbool=='light'){ uistyle.href = "//Microsoft.WinJS.2.0/css/ui-light.css";}
else {uistyle.href = "//Microsoft.WinJS.2.0/css/ui-dark.css";}}
Like: UIstyle('light'); for light UI in Windows 8 or "UIstyle()" for dark;
I used the DOM Explorer to find the buttons default values and overwrite them. It was the child element that needed to be overwritten: .win-back
I want a Qt window to come up with the following arrangement of dock widgets on the right.
alt text http://img72.imageshack.us/img72/6180/docksonside.png
Qt allows you to provide an argument to the addDockWidget method of QMainWindow to specify the position (top, bottom, left or right) but apparently not how two QDockWidgets placed on the same side will be arranged.
Here is the code that adds the dock widgets. this uses PyQt4 but it should be the same for Qt with C++
self.memUseGraph = mem_use_widget(self)
self.memUseDock = QDockWidget("Memory Usage")
self.memUseDock.setObjectName("Memory Usage")
self.memUseDock.setWidget(self.memUseGraph)
self.addDockWidget(Qt.DockWidgetArea(Qt.RightDockWidgetArea),self.memUseDock)
self.diskUsageGraph = disk_usage_widget(self)
self.diskUsageDock = QDockWidget("Disk Usage")
self.diskUsageDock.setObjectName("Disk Usage")
self.diskUsageDock.setWidget(self.diskUsageGraph)
self.addDockWidget(Qt.DockWidgetArea(Qt.RightDockWidgetArea),self.diskUsageDock)
When this code is used to add both of them to the right side, one is above the other, not like the screen shot I made. The way I made that shot was to drag them there with the mouse after starting the program, but I need it to start that way.
You can use QMainWindow::splitDockWidget .
From the docs:
Splits the space covered by the first dock widget into two parts, moves the first dock widget into the first part, and moves the second dock widget into the second part.
The orientation specifies how the space is divided: A Qt::Horizontal split places the second dock widget to the right of the first; a Qt::Vertical split places the second dock widget below the first.
You have to set QMainWindow::dockNestingEnabled to true first (but I guess you already did that).
I never tried it but I think you can set the orientation of the dock widget when adding it to the main window:
void QMainWindow::addDockWidget ( Qt::DockWidgetArea area, QDockWidget * dockwidget, Qt::Orientation orientation )