|
|
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl questions
GridCtrl questions [message #31744] |
Wed, 23 March 2011 13:16  |
 |
koldo
Messages: 3432 Registered: August 2008
|
Senior Veteran |
|
|
Hello Daniel
A couple of questions about GridCtrl:
- Calling SetToolBar() does not show toolbar automatically until a grid row is selected.
Is there any way to force toolbar to be shown?
- When a row is selected and a Del key or minus button is pushed, is there any Callback that could be called and would confirm or not if row has to be definitively deleted?
Best regards
Iñaki
|
|
|
|
|
Re: GridCtrl questions [message #31822 is a reply to message #31775] |
Wed, 30 March 2011 02:24   |
|
1-st in header of TopWindow-class
ToolButton allShipments;
void TEST() {PromptOK("TEST WINDOWS");}
void ShipmentsToolBar(Bar& bar);
2-nd - after initialization (usialy in window constructor)
listbox.SetToolBar();
listbox.WhenToolBar = THISBACK(ShipmentsToolBar);
allShipments.Image(Icons::AllShipments());
allShipments.Label(t_("All shipments"));
allShipments.Text(t_("All Shipments"));
allShipments.Tip(t_("Show All Shipments in single window"));
allShipments.WhenAction = THISBACK(TEST);
3-d - Function to adding additional ToolButton:
void ProjectEditDlg::ShipmentsToolBar(Bar& bar){
listbox.StdToolBar(bar);
bar.Separator();
bar.Add(allShipments);
}
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
[Updated on: Wed, 30 March 2011 02:31] Report message to a moderator
|
|
|
Re: GridCtrl questions [message #31824 is a reply to message #31775] |
Wed, 30 March 2011 07:46   |
|
Toolbar (not only in GridCtrl) is visible only if it contains something. Empty toolbar is drawn as a thin line. In GridCtrl you have to activate functions like appending, deleting etc. Try this code for example
grid.Appending().Searching();
grid.SetToolBar();
|
|
|
Re: GridCtrl questions [message #31825 is a reply to message #31744] |
Wed, 30 March 2011 07:51   |
|
Quote: |
- When a row is selected and a Del key or minus button is pushed, is there any Callback that could be called and would confirm or not if row has to be definitively deleted?
|
Yes, there is WhenRemovedRow (don't confuse with WhenRemoveRow)
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 15:11:19 CEST 2025
Total time taken to generate the page: 0.03056 seconds
|
|
|