How to get the actual size of control?
How to get the real size control when the preferred width/height is not defined but control have size which are automatically evaluated (for example contaier with the disposal of the battery)?
Try the LayoutUpdateHandler: https://developer.blackberry.com/cascades/reference/bb__cascades__layoutupdatehandler.html
Tags: BlackBerry Developers
Similar Questions
-
I'm writing some UI component custom waterfalls. I went if the document several times and still have two questions:
1. is it possible to adjust the width of the control to fill the container parent without specifying the number hardcoded in pixel? I see many example of code uses '768' as hardcoded width.
2. I understand that the 'preferred size' could be ignored in some cases. Is it possible that I can get the actual size of the control on the screen programmatically?
3. is there any signal was issued when a control container/finish covering all of its child nodes? How do I know what size of a control is finally decided?
Thank you
mdodd wrote:
(1) you can use (QML)
horizontalAlignment: HorizontalAlignment.Fill
or (C++)
myControl->setHorizontalAlignment(HorizontalAlignment::Fill);
This will cause control occupy the entire width available to its parent. However, keep in mind you may have to use this property on all containers of parent to the node root to get the width of the full screen.
As far as I KNOW simon_hain is located on the other two issues.
((2) & (3) I just dug around and you find LayoutUpdateHandler would do the job:
https://developer.BlackBerry.com/Cascades/reference/bb__cascades__layoutupdatehandler.html
mdodd answer on question 1) is correct.
I can't believe they made a separate category for such a common task. Framework of stunts have had some serious consistency problems, that's what I feel.
Thanks to all who have contributed to
-
Cascades - how to get the actual size of the item?
Hi all
Is it possible to get the actual width/height of the Visual element in cascade? I developed before Qt Quick applications and Qt Quick solution was simple - there's width and height properties which was always updated to the size of the real thing, and you could use them when necessary. In Silverlight, there are ActualHeight() and ActualWidth() for all visible elements. However, in the Cascades, as I see it, there are only minHeight, maxHeight, and preferredHeight and the same width, but there is no property that references element real width or height.
I need, for example, to assign the size appropriate to the ListView items - I want to create horizontal ListView which shows only a single element (that is, the image) at a time, correctly resizes this image to fit, and works for a screen resolution and orientation. Qt Quick, I solved this by linking the width and the height to the width of the container of the element of the list element and (Rectangle) height of ListView and using the good snapMode (i.e. SnapOneItem). This works perfectly for any screen size & resolution. How can I do something like this in stunts without Hardcoding the 'magic numbers' preferredWidth and preferredHeight?
Thanks in advance for your answer.
You can get the width and height by using LayoutUpdateHandler of the element:
https://developer.BlackBerry.com/Cascades/reference/bb__cascades__layoutupdatehandler.html
LayoutUpdateHandler::create(scrollView) .onLayoutFrameChanged(this, SLOT(handleLayoutFrameUpdated(QRectF)));
-
How can I get the actual size of an element in a photo?
HI -.
I was responsible for providing the actual measurements of the elements in the photographs. (There are 300 different photos, so I hope we find a pretty direct solution).
My thought process was to open a photo, drag a bounding box around the document with the tool of the mark and read the precautions in the Info Panel. But it does not work too well.
In the sake of discussion, let's say I have a picture of a simple, plastic, badge/toy type 'happy meal '. The insignia is actually 1 "squares.
When I drag the box around it the Panel Info tells me that it measures W:3.37 "X H:3.37".
' ' I can't figure out how to get l: 1 "x H:1" to appear in the Info Panel.
Dimensions of the photo show a massive 66 "x 44" at 72 dpi, and it seems that all 300 of these photos have the same dimensions, so one solution it should all.
So the question is - using Photoshop, how to learn the physical measures of an element in a photo?
I thought that this should be simple, but it turns out to be a real headache.
Any expert TIA of entry.
Josh
You open the dialog box Image size (Ctrl Alt i or Cmd Opt i on a Mac). Make sure that resampling is _not_ checked and the width is defined in inches. Now do a little math:
Size of your choice as 3.37 in. is indicated in your case, but you know that the actual size is 1 inch, multiply all that is in the field of the resolution of 3.37
So if it's 72 resolution must be 242.64
Make this change and OK it
Drag another sample around the badge to check that the right size now.
Don't forget: Re-sample must be disabled in the Image Size dialog box.
-
How to get the physical size of the screen?
Hi all
How to get the physical width and height of the screen (not resolution) in inches or in centimeters?
Is there a method to do
Thank you very much
Display.getWidth () and Display.getHeight () you will get the number of pixels.
Display.getHorizontalResolution (); and Display.getVerticalResolution () to get the pixels per meter. Then by dividing appropriately you can find the actual size.
-
How to get the 'description' of a control property if the control is a part of the cluster?
Hi, dear all
LV offers the possibility to work with the property 'description' of the individual control of the VI. The use of knots of property: reference VI > front propert > control [] property > Description.
Unfortunately, I found a way to set or get the description of a control if it's a part of the cluster =)
Could someone suggest the idea?
Thanks in advance,
Max
interesting problem, I tried, take a look.
your
RZM
-
How to get the real size of the screen?
Hi all
I want to get the size of the BACKGROUND object screen AREA.
I tried to call
my_main_screen.getMainManager () .getVirtualWidth ();
or
my_main_screen.getMainManager () .getVisibleWidth ();
But they always return 0.
How to get this size? Thank you!
Hey there. You can summarize this article:
then you replace in your test screen
protected void onUiEngineAttached(boolean attached) { String width = String.valueOf(getMainManager().getWidth()); String height = String.valueOf(getMainManager().getHeight()); Dialog.alert(width + " : " + height); }
That you will get the result. On my 9630 Simulator, I saw the following values for the width and height: 480 and 333 respectively.
I hope it works for you.
-
How to get the TOTAL size of the article before you download?
Hi all
Anyone know how to see what is the total size of the article before you download? I have an article that contains the video and several pages. I know I'm next above the limit, but I can't see how. I know that you can see the total link but surely Indesign, it's self will add more info on which will increase the size? I checked the video and pictures and they seem to fall under the 200 MB for the article. That article is not big so I need to know what is the total amount.
I hope someone can help!
(B) the limit is 100 MB for an article.
That's really low, when you add videos to your article, so I hope they will change that in the future!
-
To Powercli how to get the actual number of the paths to the data details store
I'm looking for a command Powercli get the real number of the paths to the data store > Details of the data store
See you soon,.
Vincent
You can do something like this
$esxName = "MyEsx".
$esx = get-VMHost-name $esxName
$esxcli = get-EsxCli - VMHost $esx
$esxcli.storage.vmfs.extent.list () |
Select VolumeName,ExtentNumber,@{N='Device'; E={$_. DeviceName}},
@{N = ' path # ';} E = {}
$esxcli.storage.core.path.list ($_.) DeviceName) | Measure-object | Select Count - ExpandProperty
}}
-
How to get the original size of pictures? Microsoft office Picture Manager
I used household image and all my photos are made smaller, but now I want size beck to original size. How can I do?
You can enlarge the current versions of the photos
in the photo... Manager using custom or
Options of percentage but there is no way to return
to the original version in Office Picture Manager.
Extended versions is not the same quality
than the originals.Info about photo manager
If you resize a photo with Picture Manager and
save it when you see the dialog box saying:"There are changes that have not been saved"
The original photo will be overwritten (replaced)
with the rezized version... IOW the original will
be unrecoverable.To keep two versions of the picture, resize it
and go... File / save as... Enter a new name for
version resized and on the left, click on the "Save" button.When you close the photo manager and see the
dialog box:"There are changes that have not been saved"
On the left, click the do not save"" button. Now
have both versions. -
How to get the nodes size in the presenter content model
Hi all
I created a content model of presenter to display a list of content carousel with x of y (current number of total size).
also I do not use af:carousel component used instead af:iterator.
is it possible I can get number total i.e. nodes size outside a java bean.
something like #{nodes.size} or nodes.length.
Please suggest something which can fly running (i.e. performing edition of the model should be enough)
Thank you
-Yves
Hi Yves,
You should be able to use #{nodes.rowCount} to EL.
-
How to get the form of Boolean control LED (round or square) in Labview 8.6?
Well, it's pretty simple...
Can be any kind of response, error, errors, Style ID anything.
But I can't seem to find an answer.
Help, please
Running of the tests here there seems to work
Thanks for the help
For one who also has to wonder how do:
-First download the script from this link and follow the instructions to activate scripiting.
https://decibel.NI.com/content/docs/doc-4973
-After that, the Style ID will appear as a property on the property node
-ID 21012 style is round LED and the 21013 is the square LED
Also even if you do not have the active script and you have a VI recorded with the property Style ID node, you can copy and paste into your VI and who still works
-
How can I know the actual size of the type in a document of intent 'web '?
I'm designing a document for iPhone 6plus pixels (1334 x 750) and need to know how translates the size. For example, when I call a text 30 PT., in the real world on the iPhone it's something much smaller than this... maybe 12 pt. This has something to with the number of pixels in the canvas... but how to convert?
So, how to calculate the actual size of the type? I'm not good at math, I need to be told how to do it.
For the output and display at 100%, InDesign defines the physical size of a pixel as "1/72, so the relationship between the print type size and displayed size of the iPhone is a simple report. For the iPhone6 72/326 Gets the relative size of the print to display discount, and 326/72 would be a multiplier. So to display 12pt type how it would print, set it to 54.4 pt (12 x 4.53). Or, to view a 1 inch by 1 inch square, resize it 453%.
For the iPhone6 more the multiplier is 401/72 or 5.57
-
How to get the size of the loaded swf file?
final/public class main extends Sprite
{
public void main()
{
loaderInfo.addEventListener (Event.COMPLETE, _onLoadCompleted);
}
private void _onLoadCompleted(event: Event): void
{
var tw: int = stage.width;
var e: int = stage.height;
TSW var: int = stage.stageWidth;
tsh var: int = stage.stageHeight;}
}
Above is my project simple as3 in flex builder 3.
My screen resolution is 1920 * 1080, when debugging, the SWF is stretched to the full EI client area, but the stage.stageWidth is 500 and the stage.stageHeight is 375, stage.widht and stage.height are 0, who can tell me why and how to get the right size of the SWF, named the area size customer of EI in this situation?
Thank you very much!
The HTML wrapper can resize the SWF later, so wait a frame and recheck stageWidth/stageHeight.
Alex Harui
Flex SDK Developer
Adobe Systems Inc..
-
How to get the maximum disk size for a powershell prompt
Hi guys
I tried all day to get the value of the maximum disk size allocated to a virtual machine. Using get - view I can see the actual size of disc but when I look at VM via 'Edit Machine' I see ' hard disk 1' ability to 40 GB and and size maximum (GB) to 97.5 - How do I get this maximum size via powershell?
See you soon
Sparky
Near there, it is actually the amount of free space on the data store over the current size of the hard drive.
With this script, you can calculate the value
foreach($dev in (Get-VM
| Get-View).Config.Hardware.Device){ if($dev.DeviceInfo.Label -like "Hard Disk*"){ $dsFree = (Get-Datastore (Get-View -Id $dev.Backing.Datastore).Info.Name).FreeSpaceMB $diskSize = ($dev.CapacityInKB / 1Kb) $MaxSize = $dsFree + $diskSize Write-Host "Maximum size for" $dev.DeviceInfo.Label "=" ("{0:f2}" -f (($dsFree + $disksize)/ 1Kb)) "Gb" } }
Maybe you are looking for
-
I get a vibration of the phone instead of my ring?
I need help? When someone calls I get only a vibrator of the phone instead of the aslwell of the ring. How can I fix it? Parameters: ringer off: rings & alerts - vibrate positioned: rings & alerts - ring and vibrate ringtones - old flight - high soun
-
HP Blu - ray Writer & SuperMulti DVD Burner just plays the DVD blu - ray on the laptop?
-
Text of the Z10 ringtones blackBerry contacts for when?
Hey! I love my new phone, I've had it for 4 days, I'm having a hard time finding a few things, I put a ringtone to a specific contact, but I don't know how to set the ringtone for when they text. I found the email and bbm in the ringtone part - opti
-
Traffic permitted only one-way for VPN-connected computers
Hello I currently have an ASA 5505. I put up as a remote SSL VPN access. My computers can connect to the VPN very well. They just cannot access the internal network (192.168.250.0). They cannot ping the inside interface of the ASA, nor any of the
-
I have re-uploaded my Photoshop recently and Adobe Bridge no longer displays my Nikon NEF files and Camera Raw will not open them. I get a message saying that Camera Raw does not support my type of camera, but it has always in the past. The bridge