gridpane resize - resize

I want a gridpane layout as in the attached image. Anyone know how to this or am I using the wrong layout?

You can control how different rows and columns in a GridPane grow using column and row constraints.
The way to do this is to set the hgrow property of the first column to ALWAYS, and the vgrow property of the first row to ALWAYS - this means the top left cell will always expand. You can either set the other cells to fixed widths/heights, or otherwise they will expand to fit their contents and no more.
I've included an FXML example with the GridPane inside an AnchorPane, and anchored to the top, left bottom and right of the AnchorPane. This means that the GridPane will grow to fill the parent AnchorPane:
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.paint.*?>
<AnchorPane id="AnchorPane" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml">
<children>
<GridPane AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" />
<ColumnConstraints prefWidth="150" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="ALWAYS" />
<RowConstraints prefHeight="150" />
</rowConstraints>
</GridPane>
</children>
</AnchorPane>
This results in the layout shown here, and expands to fill the parent pane:

Turns out what I am trying to do requires AnchorPane and GridPane.

Related

.NET MAUI Windows app. tabbed page white area

Hello everyone I am developing a Windows app with .net Maui. I am using a tabbed a page and there is a little white area on the very right of the navigation bar. narrow white area where it makes a contrast with green on the right upper corner I do not know which causes it and couldn`t get rid of it. I am also adding the photos of my navigation page and appshell. I am assuming it has something to do with the appshell, because the background color I use on the weather page is actually not white, it is a yellowish color. Would to happy to have any suggestions.
AppShell code:
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="MauiApp2.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:MauiApp2"
Shell.FlyoutBehavior="Flyout"
FlyoutBackgroundColor="White"
BackgroundColor="White">
<ShellContent
Title=""
ContentTemplate="{DataTemplate local:WeatherPage}"
Route="WeatherPage"
Content="white"
/>
</Shell>
Navigation page frontend code:
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:MauiApp2"
x:Class="MauiApp2.NaviPage"
BackgroundColor="Black"
BarBackgroundColor="Green"
BarTextColor="White"
SelectedTabColor="White"
>
<local:WeatherPage
Title="Weather"/>
<local:AboutPage1
Title="About"/>
</TabbedPage>

FlyoutLayout in FlyoutPage not appearing when FlyoutLayoutBehavior is set to Popover (works fine if it is set to Split instead)

I have a FlyoutPage in which I want to have a 'Popover' flyout layout on the left and the detail page on the right. In other words, I only want the flyout on the left to show up if I click a button, and for it to remain hidden otherwise.
I believe that's what should happen if I set FlyoutLayoutBehavior to Popover. But when I do that, no flyout menu shows up at all on the left (the detail page on the right continues working fine).
If I set FlyoutLayoutBehavior to Split instead of Popover, it works as it should (the flyout is always visible on the left, splitting the screen).
What is wrong?
This is my xaml code:
<?xml version="1.0" encoding="utf-8" ?>
<FlyoutPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:MyApp"
x:Class="MyApp.FlyoutPage"
FlyoutLayoutBehavior="Popover">
<FlyoutPage.Flyout>
<local:FlyoutMenu x:Name="menu" />
</FlyoutPage.Flyout>
<FlyoutPage.Detail>
<NavigationPage>
<x:Arguments>
<local:Contacts />
</x:Arguments>
</NavigationPage>
</FlyoutPage.Detail>
</FlyoutPage>
Thanks.

Change the background color of textInput highlight (autocomplete) on react-native

How can I change this background color of TextInput when it got highlight from the autoCompleteType that already exists on react native?
like on this image
To customize this autofill bg color, you have to set this at android level.
Create a xml file with the name of your choice, for example autofill_highlight.xml in android/app/src/main/res/drawable
Put this code inside :
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#android:color/transparent" />
</shape>
Here, the color set is transparent ("#android:color/transparent"), replace it with your color.
In android/app/src/main/res/values/styles.xml, add this line to your app theme (make sure to provide your own file name if you don't call it autofill_highlight like in my example)
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- ... your other theme customization ... -->
<!-- ADD THE FOLLOWING LINE -->
<item name="android:autofilledHighlight">#drawable/autofill_highlight</item>
</style>
</resources>
Rebuild your application :)

Change color of a dojo tab pane

How do I change the color title of a dojo tab pane of a dojo tab container in a xpage under a given condition? Could anyone give me a roadmap on how to change the label's color?
You can do it like this, and hide the style panel based on your condition
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex">
<xp:panel tagName="style">
div.dijitTab:nth-child(1){background-color:red !important}
</xp:panel>
<xp:panel style="padding:30px">
<xe:djTabContainer id="djTabContainer1">
<xe:djTabPane id="djTabPane1" title="Tab1">1</xe:djTabPane>
<xe:djTabPane id="djTabPane2" title="Tab2">2</xe:djTabPane>
</xe:djTabContainer>
</xp:panel>
</xp:view>

Reusing the same contextMenu xml for ContextMenuMailItem and ContextMenuMultipleItems

When adding items to a context menu (ribbon) in a VSTO outlook add-in (for Outlook 2009+), is there a way to use the same context menu for multiple idMso (i.e., I'd like to add the same items for when single or multiple emails are selected)? I tried the xml below, but the schema doesn't like that I'm re-using the same button id in multiple places.
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
<contextMenus>
<contextMenu idMso="ContextMenuMailItem">
<button id="DoThis"
label="Label"
onAction="DoThis"
getVisible="GetVisible"/>
</contextMenu>
<contextMenu idMso="ContextMenuMultipleItems">
<button id="DoThis"
label="Label"
onAction="DoThis"
getVisible="GetVisible"/>
</contextMenu>
</contextMenus>
</customUI>
Ideally I guess I'd like something like this:
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
<contextMenus>
<contextMenu idMso="ContextMenuMailItem,ContextMenuMultipleItems">
<button id="DoThis"
label="Label"
onAction="DoThis"
getVisible="GetVisible"/>
</contextMenu>
</contextMenus>
</customUI>
Reusing id attribute is not possible, but there is another attribute that is reusable - tag:
<button id="DoThis1" tag="DoThis" ... />
<button id="DoThis2" tag="DoThis" />
Then in the code then you can determine the command not by Id but by Tag property of the control.