on runtime paint the whole panels in the gui - swing

I want to be able to change the background color of the gui form.
If I change the parent panel gui - i want all of its descenders to get the same color.
Is it possible to do it without iterating on all comonents?
10x.

If you want components within your parent container to have the same background color you might setOpacity to false for them (at least for JPanels and other containers).
If you want your complete application to look differently you might consider switching to another Look&Feel (http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html).

Related

Implementing Google's State Layers with Vue.js and tailwindcss?

Google's Material Design 3 uses a so-called state layer for interaction states like hovering, focusing or pressing an element. These states are represented by adding a layer with a fixed opacity onto the element to change its colour.
I am currently creating a web application with Vue.js and using tailwindcss as my CSS framework, and was wondering if there is a simple way of creating these state layers. As far as I am aware, there are two possibilities.
I can either use a semi-transparent HTML element that has the same size, shape and position as the original element and set its colour and opacity to the required values. However, doing this for every element that can be interacted with would be a lot of work, greatly increase the size of my HTML code, and I do not think it is an elegant solution.
The second way I can think of is calculating the resulting color of adding the layer to the element, and setting this value when the user interacts with it. Calculating these values manually and stating them explicitly would also be a lot of work, and it would mean that whenever I change one of the content colours, I would have to recalculate all colours for interaction. Another possibility would be to calculate the values at runtime, which has the added benefit of making them dependant on the content colours, but that would mean that I have to access the tailwind variables inside my JavaScript code, and then set the corresponding classes by concatenating the tailwind class name with the calculated value.
While all of these solutions would be possible, I feel like they are neither simple nor elegant. Is there another way that I did not think of, or is the concept of state layers just not meant for these frameworks?

MS Access: Seeking to Change the BG Color of a Combo Box's DROPDOWN Only. Possible?

Everyone,
I've created a datasheet in a MS Access application that will have extensive entries when done. Each line is a single row of controls, some of which are text boxes, others of which are combo boxes.
The problem is that when there are many rows displayed on the screen, and the user clicks on a combo box, the contents of that combo box pretty much disappear against the rows behind it, because they all have the same font color/size and the same BG color, and almost no borders at all. .
I would like to be able to change the BG color of the combo boxes' DROPDOWN only, not the BG of the combo box itself. This would allow the dropdown to be easily seen against the rows behind it, and much easier for this application's users to quickly zero in on where they need to focus their attention.
This is important, because at least half of the users of this application will be over 60, and at least a dozen I know of much older than that. They really need things that are easier to see, not harder.
Is this even possible in Access?
TIA for any help.
David in Mississippi
Not possible as far as I know.
Having said that, if readability is your main concern, you can open the data sheet in design view and change the alternate row colour property to have the alternate rows have different colours.
A dropdown box will not have alternating colour so this should stand out clearly.
Set the background color of the combobox to the color you want to see for the dropdown list
change the back style of the combobox to 'transparent.' This will automatically change the back color to 'no color' but the previous color will still be used for the drop down list.
since the combobox is transparent, you'll have to decide what to do next. If you're ok with whatever is behind it showing, then you're done. Otherwise a simple trick is to position a solid-color rectangle the same size as your combobox directly behind it, using the color you actually want.

Is it possible to change the select color for form elements like a multiple select?

I want to change the selection color of a multiple select element. I'm not talking about the background color in this answer, as this only changes the background color of the selected option (the selection color is still visible on top of that).
I'm aware this color is determined by the settings of your hardware, as shown in this question, but I was wondering if there was any way other than changing your system settings that can override this setting.
You could replicate the element with divs and such and program the logic with JS. This would give you complete control over appearance.
It's also not a great idea to ask your user to learn how to use new simple UI elements. You should consider the mobile compatibility, and maintenance of this code too.

Need flash application gui architecture advice

I need your advice on how to organize a GUI in flash application. See image:
http://dl.dropbox.com/u/32811/Screen%20Shot%202012-04-25%20at%2015.40.31%20.png
Application is video player. I have buttons group that must be hidden when the mouse is out of the player. I added a Sprite, and all my buttons i have added as a child of this sprite. In this case i hide the parent, rather than each button individually.
There are several problems:
When parent Sprite resize occurred, all of his children resizes with him.
I would like to position children relative to their container, but it is very difficult, because i can not set width and height of parent sprite.
I would like to set the width and height of the parent Sprite, position buttons inside, and any resizing in it will occur automatically.
The question is: I am using the wrong tools, or use them somehow wrong? Are there any GUI frameworks that can help with building layout?
write this line at Creation Complete Event or any where at beginning of code
fscommand("allowscale","true");
it will maintain aspect ratio of application so all children of application will resize and scale properly
try this it will work

On a high-level, how would I build a carousel for images?

Can you explain to me, at a very high level, what I would need to build an image carousel for the web, please. You can use data structures and general computer science terminology - but nothing language specific.
E.g:
Store all the images in an array or linked list
When the carousel is loaded, resize the displayed images as X% window size
When the next button is pressed, imageA moves to a hidden html element.
Et cetera.
I hope that makes sense.
Thanks.
You don't want anything language specific but you want to know about carousels on the web and you've tagged this with 'html' and 'css' so I'm going to assume that I can talk about HTML and CSS but I'll try to keep it high level.
If we ignore Flash, then you're left with HTML + CSS + Javascript. The common way to do this is to arrange the images or their thumbnails (don't resize via HTML - its doesn't look good and can increase your page load time) in HTML elements that are themselves contained in one or more layers of wrapping elements. So the whole set of images strung together might be wider than the viewing window. CSS is used to manage their exact layout and to keep them from overflowing the viewing window. When I say window, I just mean the portion of the page in which you want the carousel to appear. Then Javascript is used to change the CSS properties of one of the HTML elements that is wrapping the images, causing it to scroll or shift position.
With HTML5, you have more options, but the above is the way things have usually been done until now.
Finally, if you are going to actually implement this, there are a number of scripts available that will probably meet your needs, but if not I highly recommend using a Javascript framework like JQuery - it will make things much, much easier.
If you want to build it by yourself, one straightforward way would be to have a master div and all the images in it, lined up horizontally. Have the overflow set to hidden on the master div. Then use javascript and set scrollLeft as the user clicks the next, previous buttons.