Hi i have a button (actually a Hyperlink) and i want to resize the button to fit exactly the size of the text inserted with
this->m_jlcLink.SetDisplay(str);
how can i do that?
Related
I'm customising a CFileDialog "Save As" dialog, using the built in tools. I'm simply adding a new text label (AddText or StartVisualGroup) and a new combo box (AddComboBox). It all works fine, but I don't like the positioning and sizing of the new controls.
In every article I can find on the subject, new labels and combo boxes are shown to be aligned / sized as per the existing ones (i.e., the text aligns / sizes with "Save as type:", the new combo aligns / sizes with the save as type combo). I only seem to be able to get my controls to align under the save as type combo and have a small size.
I can't find any info on how to adjust the size or position of these controls.
I want to create an owner draw menu bar (by menu bar I mean a bar that has the same width as the application window, not just to fit the menus) like the one in the image below
(Notice the menu item on the right and the background color for the bar that takes the full width of the window)
I only want the buttons to be customized (the size and the rectangle with a border on hover, and another effect when they're active), the menu popup itself has to be the Windows' default menu.
What have I done so far?
I managed to create the owner draw menu, but I have the following problems:
the menu bar rectangle is only as wide as the widths of the items summed up (I need it to take full window width)
all the menu items are styled uniformly (I only want the top buttons to be styled like that)
How can I get the desired look for my menu?
I have the following Qt widget layout
QSplitter
QFrame (select area), a QTableView
QScrollArea (data area)
QWidget (entry and edit form)
The user might prefer to see more of the select area, that's why the "data area" is in a scroll area. I can adjust the size of the "select" and "data area" by the vertical splitter. All fine.
Now I want to implement a convenience feature (keyboard shortcut) so that the "data area" extends / resizes to the (exact) size where no scrollbar is needed. But how can I obtain that height? I could increment height until the scrollbar disappears, but this is stupid.
I do not want the "data area" consuming too much space, but just as it requires to be displayed without scrollbar.
Yes, if I take the inner widget ("entry...") and add some offset (for the QSCrollArea) on top of it seems to work reasonably.
Is there any style sheets to use to increase the size of scroll button size in QGroupbox. I have to change the default size.
There are no "scroll buttons" within the QGroupBox. Perhaps you're referring to some other widget?
I have a groupbox which contains text boxes. I want more text boxes with in the same groupbox with out increasing the size of groupbox, If this groupBox has scroll it will be easy to achieve this. How to add scrollbar to Groupbox?
My MFC days are a while ago and a bit rusty, but from what I remember this isn't possible, but you can emulate this by placing a borderless, child dialog within the group box and then place your text boxes onto that.