Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8247893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:00:39+00:00 2026-06-07T23:00:39+00:00

I am using uicontrol to create GUI Elements. Following is my Code uicontrol(‘Style’,’pushbutton’, ‘String’,’Load

  • 0

I am using uicontrol to create GUI Elements. Following is my Code

uicontrol('Style','pushbutton', 'String','Load data','Parent',hTabs(1),'Position',[250 825 80 20], 'Callback',@ButtonCallback);

Here the problem is when i am using Units normalized option the GUI element is disappearing from Screen. I want to use normalized so that GUI adjusts itself in different screen resolutions. Any idea on this would be very helpful for me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T23:00:41+00:00Added an answer on June 7, 2026 at 11:00 pm

    When you use Normalized units you need to define the position between 0 and 1, with 0 being the bottom/left hand side and 1 being the total height/width of the containing object.

    You are currently defining the position using numbers that are well out of this range. You can do two things.

    • Switch the units to normalized in seperate function call (demonstrated below)
    • Create the uicontrol with normalized units, but you’ll have to calculate the proper position vector

    Here are examples on how to do either

    A simple solution is to create the uicontrol and then set the units to normalized in a separate call

    u = uicontrol(...) %don't specify the units
    set(u,'Units', 'Normalized'); % this solves your problem
    

    If you want to get the position vector in normalized units

    normPos = get(u, 'Position') % get the position in normal space
    

    Then use these numbers to create the uicontrol with normalized units:

    u = uicontrol(...,'Units','Normalized', 'Position', normPos); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making different UIView's tappable (they're not inheriting from UIControl) using the following code:
Using import datetime in python, is it possible to take a formatted time/date string
I'm using Core Data and KVO to look for changes in values to trigger
I'm using a goog.ui.toolbar to create a horizontal navigation menu at the top of
Is there a way to pass data to a (managed, C#) CustomAction? Preferably using
I have the following error on a Ios 5 application using ARC: *** -[ViewDettaglio
I have a problem using the -(void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccesoryControlTapped:(UIControl *)control method. I
I have a view (parent) and a subview (child). The child is a UIControl,
I have a UIControl subclass in my iOS App (I'm using iOS 4.3), and
I'm using this class to make a custom switch: https://github.com/robertchin/rcswitch It subclasses UIControl. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.