FAQ Database Discussion Community


Force resizement when reading text from file

javascript,css,debugging,autoresize
The duplicate suggested is the question where I got the basis for this question, so it is not a duplicate! As a matter of fact, I already have linked to that question from the start... GOOD EDIT: I made a JSFiddle ( my first time :) ). Notice how the...

Automatically re-sizing a component within a GridBagLayout

java,swing,layout-manager,gridbaglayout,autoresize
In this code I have a panel in the GridBagLayout which contains a JLabel and a JTextField. import java.awt.*; import javax.swing.*; public class Simple { JFrame simpleWindow = new JFrame("Simple MCVE"); JPanel simplePanel = new JPanel(); JLabel lblSimple; JTextField txtSimple; public void numberConvertGUI() { simpleWindow.setBounds(10, 10, 420, 80); simpleWindow.setMinimumSize(new Dimension(420,...

HTML automatically resize button and font size for phones in a form box

html,css,button,resize,autoresize
So I'm still trying to get the hang of html and css, so it could be what I want to do needs a completely different approach. So right now when I view my website on my phone the form will auto resize, but my button currently doesn't. However as you...

Cursor doesn't update in NSTextField as it autoresizes when resizing the enclosing NSWindow

objective-c,cocoa,nstextfield,autoresize,nscursor
I have an NSTextField that autoresizes. Its text is centered. When I start typing in the field and then resize the enclosing NSWindow, the cursor stays where it's at rather than repositioning to the appropriate place : I've also made an XCode project demonstrating this problem : https://www.dropbox.com/sh/cohhmslyl9ti43b/AAC6ULteopsQCMDsEArJU15Ta?dl=0 Does anyone...

How to resize a Win32 listbox to fit its content?

c++,winapi,listbox,autoresize
Is there any way to resize a Win32 listbox to fit its content (the minimum size that will show all its content, not needing a scrollbar), whenever its items change? Thank! Edit: I need resize both width and height of listbox....

How to dynamically control auto-resize components in Java Swing

java,swing,user-interface,resize,autoresize
Creating a new GUI in Java (1.8) Swing, I am searching for a way to override resize behavior of all my components. Let me explain to you with some edited photos: 1. Full Screen GUI This is my full screen GUI, with 3 panels and a JToolBar. The green one...

Center image on another Image C#

c#,winforms,gdi+,autoresize
Hi I am fairly new to C# GDI+ graphics, I want to draw an image over another, which should be centered horizontally and vertically in a fixed height and width container on an image, I tried to do this with horizontal centering and the output is weird.. I am sharing...

how to make a constant value adaptive in xcode IB

ios,xcode,autolayout,autoresize
Take the following image for example, width of top red rect is fixed to 200, width of bottom red rect is constrainted to be half of the screen width. What I need is to resize the 200 according to the screen size. Here, a constant could be a fixed width...

How to autoresize a wysihtml5 textarea correctly

javascript,jquery,autoresize,wysihtml5,bootstrap-wysihtml5
I am using bootstrap-wysihtml5 so receive input from a textarea input field. To improve the user experience I want to autoresize the textarea to fit the input text. With help from the code in this Gist I am able to resize the textarea when clicked, but not on load. Here...