How to add a second clock to a panel showing the current UTC time - xfce

I want to have a second clock in my panel not showing the localtime, instead showing the UTC time. How is this possible?

It's very easy. You just add another clock panel: right click onto the bar -> Panel -> Add new items -> Clock. Then you right click on this newly created Clock panel -> Properties -> Timezone -> UCT. Done ;)

Related

How to persist layout of commit/diff window in Xcode 12.4

In the diff window of Xcode (Source Control -> Commit..., Cmd-Opt-C) is it possible to persist the size of the left navigation section? I like to resize the navigator bar to be able to see the filenames a bit better, but it gets reset at every invocation.

how to change the period of clock in Model sim

I would like to change my period of clock from 0,1ns to 5ns. Anybody now how to do it?
As far as I understand you'd like to change Timeline Properties, but not clock period. So you should click (Right Mouse Button) on Timeline, select Grid & Timeline Properties and then choose necessary values.

VB6 + how to switch between windows/frame in form by buttons

I am very new beginner with VB6 and I hope I explain the things right
I want to create form with 2 buttons (the buttons are located on the top form position )
So each button will switch to other form/window/frame
For example
The first button will show window 1 (there I can set only parameters)
The second button will show window 2 (there I can set only IP address)
Please advice if we can do that by VB6 ?
And if yes how to do that ( step by step )
Remark - Similar example but with multiple windows in the same form is the system properties ( right click on my computer and properties ) , the we can see each button will view different window
Create a form with 2 buttons, Command1 and Command2.
On this form, create 2 frames, Frame1 and Frame2. hide Frame2 and make sure to line up both framesso that they are of the same size and located right on top of each other (Top, Left, Width and Height properties must be the same)
Now put this code in:
Private Sub Command1_Click()
Frame1.Visible = True
Frame2.Visible = False
End Sub
Private Sub Command2_Click()
Frame1.Visible = False
Frame2.Visible = True
End Sub
Now each the first button shows the first frame while hiding the 2nd. The second button hides the first frame and shows the seconds. I think this is the simplest way to implement your task.
PS: don't forget to name your objects properly, it's not a good idea to have default names like Command1 or Frame2 - should be more descriptive than that.
It sounds like you are asking about the tabbed dialog control. To use a tabbed dialog control in VB6:
Click Project -> Components
Scroll down to "Microsoft Tabbed Dialog Control 6.0" and select it.
Click the Apply button.
You should notice a new control in the component tool box. If you do not see the toolbox, click View -> ToolBox. This is the same area of the IDE where you first click to add a button to a form. The tabbed dialog control looks like the top tab of several file folders. When you hover your mouse over the control in the toolbox, you will see a tool tip text of "SSTab". Click this control and then draw a rectangle on your form.
By default, this will add a tabbed dialog control with 3 tabs, but you can change this in the properties window. You can now create any control on top of a tab of the tabbed dialog control and interact with the control exactly the same way you would if the control was placed on the form itself.
What you want is called an MDI Form. It's a form that contains other forms.
You can find a full tutorial on them here, but here's the gist of what you want to do:
Set the "MDIChild" property of all your subforms you want to use to True. Disable their minimize, maximize, and resize functions as well.
Create an MDIForm. Disable its AutoShowChildren property.
Add a toolbar to the MDIForm. Add buttons to the toolbar corresponding to the forms you'll be switching between.
Implement each button's click event, to create child form as expected (or switch to an existing one).

(SWING) Menu bar actions and state keeping

I'm writing a client app that's a bit similar to MS Excel - It has one menu bar , and you have several inner frames , each frame is a file in one of several states.
The basic flow is this : After opening a file , you can click on build , and after the build is completed you can export/save it (others scenarios are more complex).
What I'm interested in is how to change the state of the menu buttons every time you switch between frames: if you haven't pressed the "build" yet , the "export" should be disabled , but if you switch to a window where you've already pressed the "build" button and it's built , the "export"
button should be enabled.
Is there a design pattern for handling something like this? Any Best Known Methods?
Add an InternalFrameListener to every internal frame you create, and listen for internalFrameActivated events. The event contains the frame which has been activated. Ask this internal frame its state, to know if it has been built, and enable/disable the menu items accordingly.

Tab Order in interface builder?

Perhaps the hour is late, but I can't find where I can set the overall Tab Order of my interface viewer dialog, just like I can with Visual Studio.
am I missing something? The tab order is all crooked. Command-R to simulate shows it.
The Cocoa term you're looking for is "key view loop". Use the initialFirstResponder and nextKeyView outlets to connect the views together in the order you'd like to tab through them.
This is mentioned in the documentation here.
Note that the items which can receive keyboard focus will change depending on the Full Keyboard Access setting (in System Preferences > Keyboard); if disabled, tabbing will skip over various items in your key view loop.
Let the outlets are named as a, b and c. Mac default tab order is a -> b -> c -> a
But Your desired tab order is a -> c -> b ->a :
Using IB:
Set a as the initialFirstResponder.
Then put the nextKeyView accordingly as a to c, c to b and c to a.
But I prefer using codes, here it become easier to add more. As in complex UI there may be 30+ controls and you might require to shuffle and even insert new control!!!
So you can achieve the same as :
[self.a setNextKeyView:self.c];
[self.c setNextKeyView:self.b];
[self.b setNextKeyView:self.a];
I have found that placing the group of textfields in a separate view will help control the order in which the elements get their focus.
I tested in the simulator and on an iPad. It worked well for me.

Resources