wxPython: StatusBar does NOT update with long help from wxToolBar - user-interface

I am creating a ToolBar within a wx.Frame init and setting the help string as follows:
def __init_(self,...):
...
self.CreateStatusBar()
tb = self.CreateToolBar(wx.TB_HORIZONTAL|wx.NO_BORDER|wx.TB_FLAT)
tb.SetToolBitmapSize((32,32))
tb.SetSize((-1,132))
tb.AddTool(ID_CLASSIFIER, bmp, shortHelpString='Classifier', longHelpString='Launch Classifier')
...
tb.Realize()
--yet when I mouseover the toolbar icons, the StatusBar does not get updated. I had the same problem when adding PlateButtons to the toobar instead of using AddTool. Does anyone know what I'm doing wrong?
EDIT: Just tested this on Windows and it works. Turns out it's a Mac specific problem. That said, I'm still looking for a solution.
Thanks,
-Adam

I use AddLabelTool in my code and that does show the help text on the status bar:
toolbar.AddLabelTool(self.id, '', bitmap, wx.NullBitmap, self.kind,
shortHelp=wx.MenuItem.GetLabelFromText(self.menuText),
longHelp=self.helpText)

Related

Why do AxWindows Media Players affect Full Screen Generation in Visual Studio?

I'm using many AxWindows Media Players (AxWMPLib) to play sound in my piano application on Visual Studio. I'm not using them for video, and so they are all invisible. I also want to play my application in full screen mode. The full screen mode works fine with no media players, all the anchors work correctly as I want. This is the full screen without the Media Players and it is all good
However, as soon as I add one media player, it then looks like this? The anchors break and the full screen mode completely alters? I don't know why this happens, and I am really stuck as to why adding an AxWMPLib breaks the anchors like this, without altering the AxWMPLib at all.
Does anyone know why this is the case and how to fix it?
Thank you in advance :D
I have found an answer to this problem! I hope my solution below will help anyone in the future. If you are using AxWMPLib and want the form to be fullscreen, all the elements might not anchor correctly, and stay in the top left corner of the screen (like the screenshots in the question).
I found this to be caused by the WindowState Property in the Layouts section. Rather than setting the WindowState Property as Maximised, keep it as Normal, and then change the WindowState Property programmaticly in the Form_Load Sub, with the following code:
Me.WindowState = FormWindowState.Maximised
And then hopefully when you run the form, the form will still be fullscreen but the AxWMPLib won't cause it to go wrong, and everything should be anchored correctly.

Same look for title bar and non-native toolbar?

My app looks so:
I want it to look so:
I.e. same background color, no border line between title bar and toolbar.
Yes, It seems I know how to do this using native toolbar (according to this). But I would prefer to avoid using native toolbars if it's possible. This toolbar is created by Qt QML code. It's cross-platform and is used on Windows/Mac/Linux.
Is it possible?
P.S. I'm not very much familiar with native macOS programming, so some code examples in C++ or Objective-C are highly appreciated.
Thanks to this answer I have found that NSFullSizeContentViewWindowMask + transparent title bar does the trick for me. I.e.
self.window?.titlebarAppearsTransparent = true
self.window?.styleMask |= NSFullSizeContentViewWindowMask

Hints on Firemonkey not displaying in Delphi Seattle

It is nice that Firemonkey got again the Hint property for controls, at least in Delphi Berlin and Seattle.
However, the implementation seems to be a bit flawed yet.
One weird issue is that the displaying of the Hint seems related to the form's BorderIcons property. If the BorderIcons are left with the default values (Maximize, Minimize, SystemMenu), the hint shows. But if I change some of the border icons, the hints don't show any more. I don't see any logic for it, so it looks like a bug. I traced some code in the FMX.Forms unit, but couldn't find any relation to the border icons. The hints in TriggerControlHint and other methods seem to be set correctly.
Has anyone had such an issue and have you solved it somehow?
There are other issue, like hints not working on a XE8 project converted to Seattle on Windows. It was mentioned in this question Firemonkey Hints don't work in Delphi Seattle, for a project converted from XE7. I fixed that by recreating the dproj file and it probably has something to do with the default manifests/themes.
Also hints for controls placed on a TLayout don't show, because the layout doesn't have the ShowHint property. Doesn't sound very logical to me, but at least it can be overcome by setting each control's ShowHint property manually.
The issue is reported on QC as RSP-13218
After more tracing through FMX.Forms I found the bug.
In the end of the TCommonCustomForm.Create method the hint object is set with
if not (csDesigning in ComponentState) then
FSharedHint := THint.CreateNewInstance(Handle);
but when the BorderIcons are changed, and also in other cases, it calls the TCommonCustomForm.Recreate method, which also recreates the window handle, so the hint is no longer linked to it.
To fix it I had to also recreate the hint by adding a few lines before the finally clause in the Recreate method:
if Visible and ([TFmxFormState.Showing] * FormState = []) then
FWinService.ShowWindow(Self);
// Added lines
if not (csDesigning in ComponentState) then
begin
FSharedHint.Free;
FSharedHint := THint.CreateNewInstance(Handle);
end;

Issue when moving up down in a THorzScrollBox to scroll it's parent TVertScrollBox

I'm facing a problem with this 2 ScrollBox, one is TVertScrollBox which display whole screen and it have a THorzScrollBox in it, my problem is if i want to touch to the HorzScrollbox item and move up and down, my VertScrollBox have to scroll same as. Are there any ways to solve this issue? Thanks in advance
//Edit 1 : I'm using a gesture and ScrollBy(x,y) function to do with this issue. But it seem a bit laggy(not smooth) and still the HorzitonScrollBox scroll it own. A image for this(http://i.imgur.com/weOqW0R.gifv). Still watting another solution to do this
You can do it using UICollectionView as given in below example project.
http://damir.me/implementing-uicollectionview-layout
Source code link: http://bascarsija.s3.amazonaws.com/CollectionView.zip
After downloading this source code, In build settings change the value of the "Compiler for C/C++/Objective-C" to Default Compiler and run the app.
OK, I have found a simple answer.
When you have a THorzScrollBox inside of a TVertScrollBox, set THorzScrollBox.Touch.InteractiveGestures.Pan to False.

display items' values in bar chart in Jpgraph

I am using jpgraph bar chart. It all works fine but there is one thing I could not really figure it out. I need to display the value of each bar on the top of that bar (column) but it seems like I am missing something that I cant do it.
I have tried using the following:
$bplot->value->Show();
But yet it does not work! Any help is GREATLY appreciated!
It is an old question, but as I had the same problem and I solved it, I'm posting this answer as a future reference.
My problem was the order of the invoked methods. You MUST call Show after addnig the plot to the graph. As an example:
$graph = new \Graph($width, $height);
[... init graph ...]
$plot = new \BarPlot($datay);
$graph->Add($plot);
$plot->value->Show();
$plot->value->SetColor("black","darkred");
$plot->value->SetFormat('%01.2f');
I hope it helps someone.
Call the Show() method after you've added the plot to the graph.
$graph->Add($plot);
$plot->value->Show();
This example shows it can be done, and it gives a complete example of how to pull it off:
http://enacit1.epfl.ch/php/jpgraph/docs/html/exframes/frame_example20.1.html
I'd be glad to look at your code and troubleshoot if you require help beyond this.
Putting the value on top of the bar:
$bplot->SetValuePos('top');
Changing the angle:
$bplot->value->SetAngle(90);
Hiding value that are 0:
$bplot->value->HideZero();

Resources