Netbeans separted TopComponent in editor mode ignores minimum size - user-interface

In my Netbeans 7.11 application I have an additional separated topcomponent in an editor mode that does not respect the minimum size that I specified using the GUI-builder.
The option for "Respect Minimum Size When Resizing Windows" in the Window System tab of the branding is checked.
My .wsmode file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mode PUBLIC
"-//NetBeans//DTD Mode Properties 2.0//EN"
"http://www.netbeans.org/dtds/mode-properties2_0.dtd">
<mode version="2.0">
<name unique="myTopComponent" />
<kind type="view" />
<state type="separated" />
<constraints>
<path orientation="horizontal" number="0" weight="1" />
<path orientation="vertical" number="0" weight="1" />
</constraints>
<bounds x="150" y="150" width="1200" height="670" />
<frame state="0"/>
<empty-behavior permanent="true" />
</mode>
What am I doing wrong or what am I missing?

Related

How to increase thumb in Android Slider?

Could help me? How to increase thumb? Like this
I use
<Slider value="80" />
I found the answer for Android. Need to create file app/App_Resources/Android/src/main/res/drawable-nodpi/custom_thumb.xml
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval" >
<gradient
android:angle="270"
android:endColor="#color/colorDekraOrange"
android:startColor="#color/colorDekraOrange" />
<size
android:height="35dp"
android:width="35dp" />
</shape>
and add a property android:thumb="#drawable/custom_thumb"
But how does this property add a Slider to nativescrip?
Thank's

Error : Attribute already defined with incompatible format in "attrs.xml" in Xamarin.Android

I'm using Xamarin for developing my application.
I've no problem with other platform such as UWP and iOs.
But when I try to build Android app I receive these errors:
Errors shown in Visual Studio 2017
All these errors refers to "attrs.xml" file shown belowe :
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<declare-styleable name="DrawableStates">
<attr name="state_indeterminate" format="boolean" />
</declare-styleable>
<declare-styleable name="SfCheckBox">
<attr name="isthreestate" format="boolean" />
<attr name="cornerradius" format="float" />
<attr name="checked" format="enum">
<enum name="unchecked" value="0" />
<enum name="indeterminate" value="1" />
<enum name="checked" value="2" />
</attr>
</declare-styleable>
<declare-styleable name="SfSegmentedControl">
<!-- The selected index of SfSegmentCondrol-->
<attr name="segmentSelectedIndex" format="integer" />
<!-- The backcolor of SfSegmentCondrol-->
<attr name="segmentBackColor" format="color" />
<!-- The border color of SfSegmentCondrol-->
<attr name="segmentBorderColor" format="color" />
<!-- The border thickness of SfSegmentCondrol-->
<attr name="segmentBorderThickness" format="string" />
<!-- The color of SfSegmentCondrol-->
<attr name="segmentColor" format="color" />
<!-- The segment padding of SfSegmentCondrol-->
<attr name="segmentedPadding" format="string" />
<!-- The segment height of SfSegmentCondrol-->
<attr name="segmentedHeight" format="string" />
<!-- The segment width of SfSegmentCondrol-->
<attr name="segmentedWidth" format="string" />
<!-- The stroke thickness of SfSegmentCondrol-->
<attr name="segmentStrokeThickness" format="string" />
<!-- The corner radius of SfSegmentCondrol-->
<attr name="segmentCornerRadius" format="string" />
<!-- The position of SfSegmentCondrol-->
<attr name="segmentPosition" format="enum">
<enum name="top" value="0" />
<enum name="bottom" value="1" />
<enum name="fill" value="2" />
<enum name="border" value="3" />
</attr>
<!-- The displaymode of SfSegmentCondrol-->
<attr name="segmentDisplayMode" format="enum">
<enum name="image" value="0" />
<enum name="text" value="1" />
<enum name="imagewithtext" value="2" />
</attr>
</declare-styleable>
</resources>
Is there any problem for my "attrs.xml" file?
I already tried to clean and rebuild solutions. Remove and adding again every package but errors persists.
Thanks for your help.
Did you used the SfSegmentedControl from the Syncfusion like this link?
https://help.syncfusion.com/xamarin-android/sfsegmentedcontrol/getting-started
Based on your error message, there are two issues.
Issue1 is related to segmentPosition segmentDisplayMode.
I cannot find these attributes in SfSegmentedControl, you can refer to the following screenshot.If you want to define attributes in attrs.xml, SfSegmentedControl must have these attributes.
Solution: you could custom SfSegmentedControl to add these attributes.
Issue2 is related to SfCheckBox, the format of checked attribute is bool not enum like this screenshot.
Solutions: change the format of checked

View becomes invisible when I add attach custom view background to the view

I am trying to add a custom background to a button to make two sides rounded. But when I attach or add custom view background, the button becomes invisible. Here is my xml code:
<android.support.constraint.ConstraintLayout
Have Some Code there
<Button
android:id="#+id/Top"
android:layout_width="30dp"
android:layout_height="34dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp"
android:drawableTop="#drawable/baseline_remove_24"
android:elevation="5dp"
android:paddingTop="5dp"
android:translationZ="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
<Button
android:id="#+id/mid_button"
android:layout_width="30dp"
android:layout_height="23dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp"
android:background="#drawable/button_mid"
android:text="2"
app:layout_constraintBottom_toBottomOf="#+id/bottom"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="#+id/Top" />
<Button
android:id="#+id/bottom"
android:layout_width="30dp"
android:layout_height="34dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:background="#drawable/button_bottom_side"
//background added there
android:drawableBottom="#drawable/baseline_add_24"
android:elevation="5dp"
android:paddingBottom="5dp"
android:translationZ="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0" />
</android.support.constraint.ConstraintLayout>
Code for custom view from drawable folder is here:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<corners android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomLeftRadius="50dp"
android:bottomRightRadius="50dp" />
<stroke android:width="1dp" android:color="#BABABA" />
<solid android:color="#ffffff"/>
padding android:left="20dp" android:top="20dp"
android:right="20dp" android:bottom="20dp" />
</shape>
Image is below:
(https://imghostr.com/BwBwqrc1)

Flex Image Disappears

I am actually just learning flex, and i am getting confused with some parts. The problem is that the background image i have set in the skin works fine until i add more elements, it then just becomes a white background rather than laying the elements over the top.
I am starting to think im misunderstanding how this works. I don't understand why i need to have <s:Group id="contentGroup" /> for the image to show in the first place...this just seems like a redundant tag?
Here is the main code and the skin:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="800" height="523" maxWidth="800" maxHeight="523" initialize="httpService.send()" showStatusBar="false" backgroundColor="white" backgroundAlpha="1">
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
public var returnData:ArrayCollection;
protected function httpService_handler(event:ResultEvent):void{
returnData = event.result.people.person;
}
]]>
</fx:Script>
<fx:Style>
#namespace s "library://ns.adobe.com/flex/spark";
#namespace mx "library://ns.adobe.com/flex/mx";
</fx:Style>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<s:HTTPService id="httpService" url="" result="httpService_handler(event)" />
</fx:Declarations>
<s:BorderContainer borderVisible="false" mouseDown="nativeWindow.startMove();" skinClass="MainStyle" width="800" height="523" id="container" >
<s:HGroup left="100" top="100" id="newsSlider" width="100" height="100">
<s:Label>
<s:text>Test</s:text>
</s:Label>
</s:HGroup>
</s:BorderContainer>
</s:WindowedApplication>
<?xml version="1.0" encoding="utf-8"?>
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<!-- host component -->
<fx:Metadata>
[HostComponent("spark.components.BorderContainer")]
</fx:Metadata>
<!-- states -->
<s:states>
<s:State name="disabled" />
<s:State name="normal" />
</s:states>
<!-- SkinParts
name=contentGroup, type=spark.components.Group, required=false
-->
<s:Group id="contentGroup" width="800" height="523">
<s:BitmapImage id="bg" source="#Embed('/School Catchup/libs/images/App-BG8.png')" scaleMode="stretch" left="0" top="0" right="0" bottom="0" width="800" height="523" />
</s:Group>
</s:Skin>
contentGroup is the only "skinPart" of the SkinnableContainer component, which is the base class for BorderContainer. It's not a required skinpart (the compiler would've thrown you an error otherwise in your previous version where you didn't have the skinpart in your skin).
What is a skinPart?
It's a contract between the host component and its skin. Essentially the host component is instructing the skin (through metadata) that it needs this and this and that element (skin part) in order to function correctly. Some of these elements are absolutely required for the component to function, some are optional.
What is the contentGroup skinpart?
It's the container element to which SkinnableContainer will add its nested elements. As an example:
<s:SkinnableContainer>
<s:Label text="hello"/>
</s:SkinnableContainer>
behind the scenes, the Label instance will be added to the contentGroup skinpart of SkinnableContainer's skin.
So how do I get my example to work?
As you can see from what I explained before, the contentGroup element is just a placeHolder in the skin. If you want to add "chrome" to your custom component, add it outside that Group:
<s:BitmapImage id="bg" source="#Embed('/School Catchup/libs/images/App-BG8.png')" scaleMode="stretch" left="0" top="0" right="0" bottom="0" width="800" height="523" />
<s:Group id="contentGroup" width="800" height="523"/>
This will display the image behind the contentGroup and your Labels will now be added to it without removing the BitmapImage that you declared in there.
This is just a short explanation of the skinning mechanism in the context of your needs. I suggest you do some research on this specific topic to really understand how it works.

Getting XUL:Scale to show what numeric value is selected

I'm working with XUL, and below is abasic slider/scale implementation:
<scale value="1" min="1" max="10" increment="1"/>
However I want a numbox next to it which displays the value selected in the slider, and maybe I didn't look hard enough in the XUL tutorial, but I couldn't find a feasible answer.
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="yourwindow"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<scale value="1" min="1" max="10" increment="1" id="a"/>
<textbox readonly="true" observes="a"/>
</window>

Resources