Changing colours of Custom Controls

I've made a custom control by adding a logo to a standard boolean square button. I want to be able to change the colour of the background (the light/dark green). How do I do this? I have tried using the colours[4] property attribute, but although this reports that the colour has been changed, the control remains unaffected.
Thanks for your replies.
Richard

I think the problem lies in how you have imported your image. Rather than importing the image as a decal, you have actually replaced the images on the control with it, which will of course prevent you from changing their colors.
When you initially edit the control, don't switch into edit mode (the tweezers). Leave the control in customize mode (the wrench).
Select Edit->Import Picture From file and find your image, note that you should probably try to create an image with a transparent background.
Right Click on the button and select Import Picture->Decal.
That should place your picture on the button, without modifying the background of the button, now you can change the background statically, or dynamically. I'm attaching a control that uses a decal in the middle. You can replace the boolean in the VI I posted previously with it to see the desired result.
Regards,
Ryan K.
Attachments:
My control.ctl ‏18 KB

Similar Messages

  • How to change the BP-customer Control Account for entering Opening Balance

    Hi experts,
    I am working on a project where I have used the segmented chart of account and segment is branch.
    Project is under SAP B1 8.8 PL 05.
    Customer has 2 branches. Now both the branch have different control account for debtors. Customer (BP) master is common for both the branches.
    Now at the time of entering BP-Customer opening balance, I do not find the provison to select/change of control account. So all the opening balance entered will go into one control account only, which is set in business partner master for particular customer.
    In SAP B1 8.8 at transaction level like Sales Invoice, there is provision to select the control account. Now I believe entering opening balance is the similar functionality as Sales Invoice and there should be provison for selection of control account to user.
    Anyboady has any Idea / work around ?
    Incase there is no provison then, I believe Product development team should take this in development of SAP B1 8.8.
    BR
    Samir Gandhi

    Hi,
    I suggest you to import BP opening balance by JE template of DWT in which you just put account code as your control segmented account and additional information in "shortname" field with customer/vendor code.
    Hope this helps,
    Son.

  • Data Binding for Custom Controls?

    Hello,
    I'm a little bit confused of how to use databinding for custom controls.
    I know i can bind a property, as seen here http://help.sap.com/saphelp_uiaddon10/helpdata/en/91/f0f3cd6f4d1014b6dd926db0e91070/content.htm, but how can I map whole arrays?
    My problem is the following:
    I want to create a custom table control in SAPUI5 (as the default one doesn't provide the neccessary options and properties I need), but I can't seem to find an example how to bind "rows".
    There has to be a way to do this properly. All I can think of now, and implemented, is, passing the name of the variable in the model...
    var x = new my.controls.complex.table({data: "/status"});
    var row1 = new my.controls.complex.columnHeaderRow();
    row1.addColumn(new my.controls.complex.column({text: "", rowspan: "2", colspan: "1", content: "FIRST_COL"}));
    x.addColumnsRow(row1);
    x.placeAt("content");
    ...my JSON/model looks like:
    { "status": [ {"FIRST_COL": "a" , ...}, {"FIRST_COL": "b", ... }, ... ], ... }
    (which should translate into /status/0/FIRST_COL, /status/1/FIRST_COL, ... AFAIK)
    ... and then I use this variable name by getting the application-wide model and use the variable passed as key for the model... (please note, this code is just a snippet)
           var sapCore = sap.ui.getCore();
                if (sapCore !== undefined) {
                 var model = sapCore.getModel().getObject();
                 if (model === undefined || model == [] || model == null){ } else {
                  $.each(model, function(idx, item){
                   $.each(oControl.getColumnsRows(), function(idx, item2) {
                    $.each(item2.getColumns(), function(idx, item3){
                     var content = item3.getContent();
                     if (content !== undefined && content != ""){
                      outpLine = outpLine + "<td>" + model[idx][content] + "</td>";
    ...which still leaves me with the problem of to get an event to react to re-render on changes within the data model, as well as when there would be just an control-specific model, or just a sub-node within a model etc.
    So my question is:
    Is there a way/best practice to define data binding in a custom control and have a way to react on it, and how to react on data changes within a custom control?
    Thanks & KR
    Chris

    I create a entirely new control, from sap.ui.core.Control.
    sap.ui.core.Control.extend("my.controls.complex.table",{... });
    I did define a aggregation...
            aggregations : { columnsRows: {type : "my.controls.complex.columnRow", multiple : true, visibility: "public"}     },
    ...yet I'm still unclear how I work with this aggregation and databinding. I know we can use the bindAggreation functionallity, but since the aggregation is a object (my.control.complex.columnRow) I don't know how my JSON model should be able to bind to that aggregation (as well as how would one be able to cascade a aggregation like this down futher? For example if there is an aggregation in the object of my aggregation?), plus it still doesn't solve my problem of how I can react (for example redraw) on model changes.
    Thanks in advance,
    Chris

  • Two custom controls

    Hi
    I have two custom controls on a screen.
    I am using class C_TEXTEDIT_CONTROL, I want to catch the changes to both custom controls and save them as text later.
    I am using method GET_TEXT_AS_R3TABLE, but this only brings back the second custom control, I need both of them
    Any ideas?
    Regards
    J-J

    you have to use the proper instatiated class to get the text.
    example.
    data: c1 type ref to  C_TEXTEDIT_CONTROL ,
          c2 type ref to  C_TEXTEDIT_CONTROL .
    c1 refers to the first control and c2 refers to the second control
    to get first control text
    you have to do <b>c1</b>->GET_TEXT_AS_R3TABLE
    for the text from second contrl.
    <b>c2</b>->GET_TEXT_AS_R3TABLE
    Regards
    Raja

  • Hide the custom control while changing the tab

    Hello Experts,
    I am using many screens & subscreens in my application. In a tabstrip control, I am calling one subscreen which has Custom Control to display the text editor.
    When I change the tab say for ex from TAB1 to TAB2, the custom control with text editor remains at the same place. In TAB2 I dont want custom control of TAB1.
    Thank you to go through my query.
    Regards,
    Bhavina
    Edited by: Rob Burbank on Aug 23, 2010 5:12 PM

    Hello Alej,
    I have created one subscreen which i need in a tabstrip control. Now this subscreen has one Editor Control (CL_GUI_TEXTEDIT->TEXT_EDITOR)  which I put on Custom Control. Custom Control is placed in the subscreen with SE51.
    to put the editor control  of CL_GUI_TEXTEDIT, I need Custom Control on screen. And I didnt find any property using which we can hide custom control.
    Is there any way using classes or methods, can we put Editor Control without using the custom control of screen.
    I think in your prob, you had ALV, that we can put on another subscreen, but in my prob how can we remove custom control Please Explain.
    Thanks & Regards,
    Bhavina

  • How to select "ISO A" (auto) using Custom Controls with lever assigned to ISO change?

    On 7D Mark II with firmware 1.0.4, I have used Custom Controls to assign ISO change to the lever.  However, it is not possible to change ISO to "ISO A" (auto).  How to select "ISO A" (auto) using Custom Controls with lever assigned to ISO change? 

    Follow Up:
    Ok so ive changed things up a bit and have had some more success.
    I have used a Switch statement in my For loop to perform different actions based on the item selected.
    The code looks like this:
    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)
    var fFrom = xfa.resolveNodes("Workbook.Content.Table1.Row3.AppropriationDetails[*] .Row4.Cell1");
    var fTo = xfa.resolveNodes("Workbook.Content.Table2.Row3.AppropriationDetails[* ].Row4.Cell1");
    for (var i=0; i <= fFrom.length-1; i++) {
         switch (fFrom.item(i).rawValue)
         case "Option 3":
         fTo.item(i).rawValue = "Enter the details in the field below";
         break;
         default:
         fTo.item(i).rawValue = fFrom.item(i).boundItem(xfa.event.newText);
         break;
    This code solves my problem but has thrown up a new issue:
    When i select Option 1 or 2 from the dropdown list  the change in the text field is instantaneous, however if I select Option 3 it wont appear in the text field until I either select Option 3 a second time or select another item. Its as if the text field is a selction behind what I have enterd in the dropdown list.
    Any thoughts?

  • Camera raw images change colour in adobe bridge

    I have photoshop CS4 and import my camera raw images into Adobe Bridge.  When I view the thumbnails in bridge my raw images look vibrant and exactly like they appear on the camera but when I go to open them in camera raw edit they change colour and look washed out before I've made any changes.  Can anyone help me figure out how to correct this?

    ssprengel wrote:
    My camera is set to shoot sRGB JPGs and is set to all zeros for the brightness/contrast/saturation parameters.
    What is your camera set to as far as these basic toning settings, as well as any automatic things like DLighting or highlight compression and perhaps any custom curves or whatever that is called for Nikons?
    First paragraph - so is mine.
    Second paragraph - all other settings are neutral/zeroed/turned off, as per my post to which you responded. That is, no additional tone curves - Active D-Lighting turned OFF (why anyone would let the camera decide what to do do with highlights and shadows is beyond my level of trust) , Jpg compression is Optimal (least possible) et cetera.
    Think I now have an explanation for the different displays in ACR (and Bridge) that I have been experiencing. Took a new duplicate Jpg/Raw shot with the in-camera Picture Control set to Neutral. Now, when both the Jpg and .NEF Raw are viewed in ACR, with the ACR Camera profile set to Camera Neutral, they appear, ASAICT, identical. Saved Camera Neutral as the default ACR Camera profile. Now back in Bridge, the images also appear pretty much identical.
    I think what was happening previously was that I had failed to save Camera Standard in ACR as the default Camera profile, and it was defaulting to Adobe Standard, and hence it was rendering Raw thumbnails for Bridge to that Camera profile - hence the difference in appearance between the Jpg and Raw in Bridge. Unless I have got it completely wrong,  I think my problem is now solved.

  • How do you Create a Custom Control

    Is it possible to create a custom control under LabWindows ?
    I want to creat a control that represents a mobile phone.
    It will be a rectangle with about 4 lines of text displayed in it witch needs to be programmatically entered and the back ground colour needs to be able to be change to represent different states also programmatically.

    I don't know if it's possible to create custom controls under CVI. I can suggest you some hint to help solve your problem.
    As for the second part of your question, you could use a picture ring with different pictures (with different background color) associated with the different states in your program. When program state changes you will only have to SetCtrlVal (panel, control, state) to have the picture ring display the desired colour. I guess this is a simple indicator, so you can put Control mode to indicator and hide inc/dec arrow in order to exclude operator's managing of the control.
    As a workaround about the four line of text to be displayed, what about putting on top of the picture ring a simple text box or text message with transparent backgroud col
    our and frame colour? At the cost of managing two different controls, the matter should work...
    Roberto
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to create a custom control of a button where the look will be applied to all others but not the Boolean text?

    Hi all
    I would like to create a customized button as a master so that if I change the look of the master all other buttons will change too.
    I have done this with a custom control as a "strict type def" otherwise the look will not change BUT If I do this as a strict type def I cannot change the Boolean text anymore which should be different on every button.
    How can I create a master control of a button where the look will be applied to all others but not the Boolean text?
    Stay Hungry, Stay Foolish
    Solved!
    Go to Solution.

    Steve Chandler wrote:
    I don't think you can do that. I just looked and as I suspected the Boolean text property is read only for strict typedefs so you cannot use property nodes to change the text.
    As a workaround just make it a typedef. When you want to change the look open the typedef and make it strict, make your changes, then make it non strict again. You will have to update the Boolean text again for all instances. Kind of a pain. Maybe this is something for the idea exchange.
    Kudos for being sneaky.
    I like these creative work-arounds!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Using a Meter control in LV Touch Panel, and using shared variables that are custom controls.

    I Just started using LV touch Panel module with an NI TPC-2106.
    I have two differenct problems:
    1) I was planning on using the "Meter" control quite a bit. I can set up the meter exactly how I like on the host PC, but on the touch Panel computer it seems to ignore my adjustments, mainly the start and end of the scale - i.e. I would like control to run from 0 to 360 with 0 straight up, using the entire circle. However, on the Touch panel computer it always puts 0 at about 7 o'clock and 360 at about 5 o'clock. I have also tried adding markers to no avail.
    2) I am communicating with a compact fieldpoint controller. I can creat a shared variable that is a simple double with no problems. However, I have some shared variables that use a custom control for the variable type - bascially a cluster with a couble doubles, a time stamp, and an enumeration. It lets me drag the shared variable into my diagram, but it seems to ignore it when I run it.

    Ipshita_C,
    - I am using LV 8.6.1f1and LV Touch Panel 8.6.1.
    - I have attached a simplified VI that shows how I want to use the meter. Notice that the placement of the endpoitns does not work correctly on the touch panel, and that it ignores the arbitrary markers that I placed.
    - I also have included an XY graph control that displays on the TPC with margins around the graph area that I removed from the graph control.
    - For the shared variable, it appears to be an issue related to the touch panel, not fieldpoint. I found another thread in this forum that mentioned that clusters containing Enumerations do not work in shared variables on the touch panel. I changed the enumeration to an integer and it now works fine.
    In general, there seem to be a disappointing number of limitations in the touch panel implementation. My biggest concern is that I have not found any documentation from NI that lists these limitations. I seem to have to try things out and see what works and what does not work. Can you point me to a comprehensive list of touch panel modules limitations?
    Attachments:
    test 2.vi ‏10 KB

  • How to have custom control in DataGridView display object's value?

    I have a sample project located
    here
    The project has a main form `Form1` where the user can enter customers in a datagridview. The `CustomerType` column is a custom control and when the user clicks the button, a search form `Form2` pops up.
    The search form is populated with a list of type `CustomerType`. The user can select a record by double-clicking on the row, and this object should be set in the custom control. The `DataGridView` should then display the `Description` property but in the background
    each cell should hold the value (ie. the `CustomerType` instance).
    The relevant code is located in the following classes:
    The column class:
    public class DataGridViewCustomerTypeColumn : DataGridViewColumn
    public DataGridViewCustomerTypeColumn()
    : base(new CustomerTypeCell())
    public override DataGridViewCell CellTemplate
    get { return base.CellTemplate; }
    set
    if (value != null && !value.GetType().IsAssignableFrom(typeof(CustomerTypeCell)))
    throw new InvalidCastException("Should be CustomerTypeCell.");
    base.CellTemplate = value;
    The cell class:
    public class CustomerTypeCell : DataGridViewTextBoxCell
    public CustomerTypeCell()
    : base()
    public override void InitializeEditingControl(int rowIndex, object initialFormattedValue, DataGridViewCellStyle dataGridViewCellStyle)
    base.InitializeEditingControl(rowIndex, initialFormattedValue, dataGridViewCellStyle);
    CustomerTypeSearch ctl = DataGridView.EditingControl as CustomerTypeSearch;
    if (this.Value == null)
    ctl.Value = (CustomerType)this.DefaultNewRowValue;
    else
    ctl.Value = (CustomerType)this.Value;
    public override Type EditType
    get { return typeof(CustomerTypeSearch); }
    public override Type ValueType
    get { return typeof(CustomerType); }
    public override object DefaultNewRowValue
    get { return null; }
    And the custom control:
    public partial class CustomerTypeSearch : UserControl, IDataGridViewEditingControl
    private DataGridView dataGridView;
    private int rowIndex;
    private bool valueChanged = false;
    private CustomerType value;
    public CustomerTypeSearch()
    InitializeComponent();
    public CustomerType Value
    get { return this.value; }
    set
    this.value = value;
    if (value != null)
    textBoxSearch.Text = value.Description;
    else
    textBoxSearch.Clear();
    private void buttonSearch_Click(object sender, EventArgs e)
    Form2 f = new Form2();
    DialogResult dr = f.ShowDialog(this);
    if (dr == DialogResult.OK)
    Value = f.SelectedValue;
    #region IDataGridViewEditingControl implementation
    public object EditingControlFormattedValue
    get
    if (this.value != null)
    return this.value.Description;
    else
    return null;
    set
    if (this.value != null)
    this.value.Description = (string)value;
    public object GetEditingControlFormattedValue(DataGridViewDataErrorContexts context)
    return EditingControlFormattedValue;
    public void ApplyCellStyleToEditingControl(DataGridViewCellStyle dataGridViewCellStyle)
    this.BorderStyle = BorderStyle.None;
    this.Font = dataGridViewCellStyle.Font;
    public int EditingControlRowIndex
    get { return rowIndex; }
    set { rowIndex = value; }
    public bool EditingControlWantsInputKey(Keys key, bool dataGridViewWantsInputKey)
    return false;
    public void PrepareEditingControlForEdit(bool selectAll)
    //No preparation needs to be done
    public bool RepositionEditingControlOnValueChange
    get { return false; }
    public DataGridView EditingControlDataGridView
    get { return dataGridView; }
    set { dataGridView = value; }
    public bool EditingControlValueChanged
    get { return valueChanged; }
    set { valueChanged = value; }
    public Cursor EditingPanelCursor
    get { return base.Cursor; }
    #endregion
    private void CustomerTypeSearch_Resize(object sender, EventArgs e)
    buttonSearch.Left = this.Width - buttonSearch.Width;
    textBoxSearch.Width = buttonSearch.Left;
    However, the `DataGridView` is not displaying the text and it also is not keeping the `CustomerType` value for each cell.
    What am I missing?
    Marketplace: [url=http://tinyurl.com/75gc58b]Itza[/url] - Review: [url=http://tinyurl.com/ctdz422]Itza Update[/url]

    Hello,
    1. To display the text, we need to override the ToString method for CustomerType
    public class CustomerType
    public int Id { get; set; }
    public string Description { get; set; }
    public CustomerType(int id, string description)
    this.Id = id;
    this.Description = description;
    public override string ToString()
    return this.Description.ToString();
    2. To get the cell's value changed, we could pass the cell instance to that editing control and get its value changed with the following way.
    public partial class CustomerTypeSearch : UserControl, IDataGridViewEditingControl
    private DataGridView dataGridView;
    private int rowIndex;
    private bool valueChanged = false;
    private CustomerTypeCell currentCell = null;
    public CustomerTypeCell OwnerCell
    get { return currentCell; }
    set
    currentCell = null;
    currentCell = value;
    public CustomerTypeSearch()
    InitializeComponent();
    private void buttonSearch_Click(object sender, EventArgs e)
    Form2 f = new Form2();
    DialogResult dr = f.ShowDialog(this);
    if (dr == DialogResult.OK)
    currentCell.Value = f.SelectedValue;
    this.textBoxSearch.Text = f.SelectedValue.Description;
    #region IDataGridViewEditingControl implementation
    public object EditingControlFormattedValue
    get
    if (this.currentCell.Value != null)
    return (this.currentCell.Value as CustomerType).Description;
    else
    return null;
    set
    if (this.currentCell != null)
    (this.currentCell.Value as CustomerType).Description = (string)value;
    public object GetEditingControlFormattedValue(DataGridViewDataErrorContexts context)
    return EditingControlFormattedValue;
    public void ApplyCellStyleToEditingControl(DataGridViewCellStyle dataGridViewCellStyle)
    this.BorderStyle = BorderStyle.None;
    this.Font = dataGridViewCellStyle.Font;
    public int EditingControlRowIndex
    get { return rowIndex; }
    set { rowIndex = value; }
    public bool EditingControlWantsInputKey(Keys key, bool dataGridViewWantsInputKey)
    return false;
    public void PrepareEditingControlForEdit(bool selectAll)
    //No preparation needs to be done
    public bool RepositionEditingControlOnValueChange
    get { return false; }
    public DataGridView EditingControlDataGridView
    get { return dataGridView; }
    set { dataGridView = value; }
    public bool EditingControlValueChanged
    get { return valueChanged; }
    set { valueChanged = value; }
    public Cursor EditingPanelCursor
    get { return base.Cursor; }
    #endregion
    private void CustomerTypeSearch_Resize(object sender, EventArgs e)
    buttonSearch.Left = this.Width - buttonSearch.Width;
    textBoxSearch.Width = buttonSearch.Left;
    Cell:
    public class CustomerTypeCell : DataGridViewTextBoxCell
    public CustomerTypeCell()
    : base()
    public override void InitializeEditingControl(int rowIndex, object initialFormattedValue, DataGridViewCellStyle dataGridViewCellStyle)
    base.InitializeEditingControl(rowIndex, initialFormattedValue, dataGridViewCellStyle);
    CustomerTypeSearch ctl = DataGridView.EditingControl as CustomerTypeSearch;
    ctl.OwnerCell = this;
    public override Type EditType
    get { return typeof(CustomerTypeSearch); }
    public override Type ValueType
    get { return typeof(CustomerType); }
    public override object DefaultNewRowValue
    get { return null; }
    Result:
    Regards,
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Problem with custom control and focus

    I've a problem with the focus in a custom control that contains a TextField and some custom nodes.
    If i create a form with some of these custom controls i'm not able to navigate through these fields by using the TAB key.
    I've implemented a KeyEvent listener on the custom control and was able to grab the focus and forward it to the embedded TextField by calling requestFocus() on the TextField but the problem is that the TextField won't get rid of the focus anymore. Means if i press TAB the first embedded TextField will get the focus, after pressing TAB again the embedded TextField in the next custom control will get the focus AND the former focused TextField still got the focus!?
    So i'm not able to remove the focus from an embeded TextField.
    Any idea how to do this ?

    Here you go, it contains the control, skin and behavior of the custom control, the css file and a test file that shows the problem...
    control:
    import javafx.scene.control.Control;
    import javafx.scene.control.TextField;
    public class TestInput extends Control {
        private static final String DEFAULT_STYLE_CLASS = "test-input";
        private TextField           textField;
        private int                 id;
        public TestInput(final int ID) {
            super();
            id = ID;
            textField = new TextField();
            init();
        private void init() {
            getStyleClass().add(DEFAULT_STYLE_CLASS);
        public TextField getTextField() {
            return textField;
        @Override protected String getUserAgentStylesheet() {
                return getClass().getResource("testinput.css").toExternalForm();
        @Override public String toString() {
            return "TestInput" + id + ": " + super.toString();
    }skin:
    import com.sun.javafx.scene.control.skin.SkinBase;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.event.EventHandler;
    import javafx.scene.control.TextField;
    import javafx.scene.input.KeyCode;
    import javafx.scene.input.KeyEvent;
    public class TestInputSkin extends SkinBase<TestInput, TestInputBehavior> {
        private TestInput control;
        private TextField textField;
        private boolean   initialized;
        public TestInputSkin(final TestInput CONTROL) {
            super(CONTROL, new TestInputBehavior(CONTROL));
            control     = CONTROL;
            textField   = control.getTextField();
            initialized = false;
            init();
        private void init() {
            initialized = true;
            paint();
        public final void paint() {
            if (!initialized) {
                init();
            getChildren().clear();
            getChildren().addAll(textField);
        @Override public final TestInput getSkinnable() {
            return control;
        @Override public final void dispose() {
            control = null;
    }behavior:
    import com.sun.javafx.scene.control.behavior.BehaviorBase;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.event.EventHandler;
    import javafx.scene.input.KeyCode;
    import javafx.scene.input.KeyEvent;
    public class TestInputBehavior extends BehaviorBase<TestInput> {
        private TestInput control;
        public TestInputBehavior(final TestInput CONTROL) {
            super(CONTROL);
            control = CONTROL;
            control.getTextField().addEventFilter(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>() {
                @Override public void handle(final KeyEvent EVENT) {
                    if (KeyEvent.KEY_PRESSED.equals(EVENT.getEventType())) {
                        keyPressed(EVENT);
            control.focusedProperty().addListener(new ChangeListener<Boolean>() {
                @Override public void changed(ObservableValue<? extends Boolean> ov, Boolean wasFocused, Boolean isFocused) {
                    if (isFocused) { isFocused(); } else { lostFocus(); }
        public void isFocused() {
            System.out.println(control.toString() + " got focus");
            control.getTextField().requestFocus();
        public void lostFocus() {
            System.out.println(control.toString() + " lost focus");
        public void keyPressed(KeyEvent EVENT) {
            if (KeyCode.TAB.equals(EVENT.getCode())) {
                control.getScene().getFocusOwner().requestFocus();
    }the css file:
    .test-input {
        -fx-skin: "TestInputSkin";
    }and finally the test app:
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.GridPane;
    import javafx.stage.Stage;
    public class Test extends Application {
        TestInput input1;
        TestInput input2;
        TestInput input3;
        TextField input4;
        TextField input5;
        TextField input6;
        Scene     scene;
        @Override public void start(final Stage STAGE) {
            setupStage(STAGE, setupScene());
        private Scene setupScene() {
            input1 = new TestInput(1);
            input2 = new TestInput(2);
            input3 = new TestInput(3);
            input4 = new TextField();
            input5 = new TextField();
            input6 = new TextField();
            GridPane pane = new GridPane();
            pane.add(input1, 1, 1);
            pane.add(input2, 1, 2);
            pane.add(input3, 1, 3);
            pane.add(input4, 2, 1);
            pane.add(input5, 2, 2);
            pane.add(input6, 2, 3);
            scene = new Scene(pane);
            return scene;
        private void setupStage(final Stage STAGE, final Scene SCENE) {
            STAGE.setTitle("Test");
            STAGE.setScene(SCENE);
            STAGE.show();
        public static void main(String[] args) {
            launch(args);
    The test app shows three custom controls on the left column and three standard textfields on the right column. If you press TAB you will see what i mean...

  • Update of custom control

    Hello experts,
    I built a program with just 1 screen. This screen consists of 2 sections. Section 1 contains input fields for a selection, section 2 constains a custom control on which the selected data is displayed as pdf. For the creation of the pdf I use smartforms.
    First selection works fine.
    If I do a second selection with other selection values the pdf is not updated but displays the values of the first selection. How can I display the new values?
      IF custom_container IS INITIAL.
        CREATE OBJECT custom_container
              EXPORTING container_name = 'CUSTOM_CONTROL'.
      ENDIF.
      CREATE OBJECT html_viewer
          EXPORTING parent  = custom_container.
    * pdf_string_x in Tabelle konvertieren
      length = XSTRLEN( pdf_string_x ).
      full_lines = length DIV 1000.
      last_length = length MOD 1000.
      CLEAR offset.
      DO full_lines TIMES.
        i_data = pdf_string_x+offset(1000).
        APPEND i_data TO it_data.
        offset = offset + 1000.
      ENDDO.
      i_data = pdf_string_x+offset(last_length).
      APPEND i_data TO it_data.
      CALL METHOD html_viewer->load_data
        EXPORTING
    *    URL                  =
          type                 = 'text'
          subtype              = 'pdf'
    *    SIZE                 = pdf_fsize
    *    ENCODING             =
    *    CHARSET              =
    *    LANGUAGE             =
        IMPORTING
          assigned_url         = url
        CHANGING
          data_table           = it_data[]
    *  EXCEPTIONS
    *    DP_INVALID_PARAMETER = 1
    *    DP_ERROR_GENERAL     = 2
    *    CNTL_ERROR           = 3
    *    others               = 4
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL METHOD cl_gui_cfw=>flush.
      CALL METHOD html_viewer->show_data
        EXPORTING
          url = url.
    Thanks in advance!
    Johannes

    CLEAR IT_DATA[].
      DO full_lines TIMES.
        i_data = pdf_string_x+offset(1000).
        APPEND i_data TO it_data.
        offset = offset + 1000.
      ENDDO.
    Use   CLOSE_DOCUMENT
          or DO_REFRESH method the second time

  • Property binding between custom control and its aggregations

    Hi,
    I have a custom control with some properties, e.g., visible, and I would like to bind these properties to its aggregated controls without losing the two-way binding functionality. For example, imagine the following control:
    sap.ui.core.Control.extend('dev.view.control.MyControl', {
      metadata: {
        properties: {
          'visible': {type: 'boolean', defaultValue: false},
        aggregations : {
          _innerTable : {type : 'sap.m.Table', multiple : false, visibility: 'hidden'}
    So in this example, I would like to bind the "visible" property of the _innerTable to the "visible" property of MyControl without losing two-way binding. That means that I do not want to read the "visible" property once in a constructor or so and set it on the inner table. Instead I want _innerTable to react on changes of the "visible" property of MyControl so that I can bind it, for example, with "visible={/model/visible}" on an instance of MyControl and _innerTable changes when the model changes.
    Does anyone know if such a "piping" or "chaining" of properties is possible and how it would be done?

    It's close to my case, but you pass the label to your custom control from outside, where you also perform the data binding. In this case, you know which path should be bound to the label property.
    In my case, the control is hidden inside my control, so I do not know which path from the model should be bound to the inner control. I want to somehow connect the property of my control with the property of the inner control.
    So taking part of your example, the control would look like:
    sap.ui.core.Control.extend('xcontrol', {
      metadata: { 
        properties: {
          'visible': {type: 'boolean', defaultValue: true}
        aggregations : { 
          _header : {type : 'sap.m.Label', multiple : false, visibility: 'hidden'}
      init: function() {
        this.setAggregation('_header', new sap.m.Label({
          visible: <????>
      renderer: function(oRm, oControl) {
        oRm.write("<div");
        oRm.writeControlData(oControl);
        var header = oControl.getAggregation('_header');
        if (header) {
          oRm.renderControl(header);
        oRm.write('</div>');
    At point <????> I want to somehow bind the visible attribute of the label to the visible property of xcontrol without losing the two-way binding, i.e., the label should react on changes of the visible property just like xcontrol would.

  • Customized Control shape varies in Windows XP to Windows 7

    Hello all
     I have created few customized control icon and used in my application,for development i using windows XP ,screen resolution -1280X1024,when i use the Exe created in Windows7 system with screen resolution 1280X1024, the customized control icon resizes it shape.
    i have tried by enabling and disabling the scaling and proportioning of panel objects in a VI to see the difference ,
    File>>VI Properties>>Window Size>>Enable - Maintain proportions of window for different monitor resoltion & scale all objects on front panel as window resizes ,
    please find the attched image for reference.kindly help me out ,if anyone have the solution to overcome this.
    Attachments:
    comparison 1.JPG ‏46 KB

    I don't know for sure, but your problem may be the font changes between Windows XP and Windows 7.  By default, buttons have boolean text centered in the middle of the button.  Even if the there is no text, the button will still resize with font sizes.  To prevent this from happening, right click the button to select the properties and deselect the option to center the text.  If you have disabled showing text, you will need to enable it, deselect centering, then disable text again.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

Maybe you are looking for

  • Can I use Photoshop cloud on my iMac and MacBook Pro as long as I'm only using one device at a time

    does a subscription allow a user to have the software on two devices as long as it is being used on only one device at a time?

  • Query Bex Problem

    Hi, I have a problem when I open a query Bex With 7.0 BW. There is a Analyzer Message Popup with this error: ! Creation of Item TEXTELEMENT_23 Failed ! Creation of Item TEXTELEMENT_2 Failed ! Creation of Item TEXTELEMENT_4 Failed ! Creation of Item T

  • Project file will not open

    I have  project file that will not open-and crashes LOGIC X everytime I try. Can I salvage this? BTW I FIND THIS NEW LOGIC X VERY BUGGY AND IT CRASHES ALL THE TIME. I always send in the report to Apple, to no avail. I might go back to 9.

  • SavingVolumeSetting...Somewhere

    I can't read anything from the records I add to my recordStore.When I run: System.out.println(database.getRecord(1) + "getting record" ); System.out.println(database.getNumRecords()+"NumRecords");I get: [B@f2cf6eb5getting record 9NumRecordsI really n

  • XP64bit installation halts, K8N Neo4 Platinum - No SATA drives found?

    My setup: Athlon 64 3500+ K8N Neo4 Platinum 2GB OCZ 3200 Premier 2) WD Sata 80GB HD's (for RAID 0) Nvidia 6800GT Extreme VGA I was recently lucky enough to get my hands on a real Windows XP Pro64bit Extended Edition. I gathered quite a few 64bit driv